mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 07:28:14 -07:00
Init repo
This commit is contained in:
commit
764b6034e3
566 changed files with 212335 additions and 0 deletions
30
lib/widgets/shared/list_button.dart
Normal file
30
lib/widgets/shared/list_button.dart
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
class ListButton extends ConsumerWidget {
|
||||
final String label;
|
||||
final Icon icon;
|
||||
final VoidCallback onTap;
|
||||
final double height;
|
||||
const ListButton({required this.label, required this.icon, required this.onTap, this.height = 56, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return ListTile(
|
||||
onTap: onTap,
|
||||
horizontalTitleGap: 15,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 14, vertical: 5),
|
||||
leading: Padding(
|
||||
padding: const EdgeInsets.all(3),
|
||||
child: icon,
|
||||
),
|
||||
title: Text(
|
||||
label,
|
||||
style: Theme.of(context).textTheme.labelLarge,
|
||||
),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(28.0)),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue