27 lines
647 B
Dart
27 lines
647 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class SettingItem extends StatefulWidget {
|
|
|
|
final String name;
|
|
final String value;
|
|
final Function onTap;
|
|
|
|
SettingItem({Key key, this.name, this.value, this.onTap}) : super(key: key);
|
|
|
|
@override
|
|
_SettingItemState createState() => _SettingItemState();
|
|
}
|
|
|
|
class _SettingItemState extends State<SettingItem> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
child: ListTile(
|
|
title: Text(widget.name),
|
|
subtitle: widget.value !=null ? Text(widget.value) : null,
|
|
trailing: Icon(Icons.chevron_right),
|
|
onTap: widget.onTap,
|
|
),
|
|
);
|
|
}
|
|
} |