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