forked from mirrors/material_3_expressive
Refactor button component and add new sections for loading indicators, icons, and navigation; update enums and pubspec description
This commit is contained in:
parent
62ecb86b76
commit
020db0ac38
23 changed files with 1033 additions and 828 deletions
40
apps/gallery/lib/sections/icon_button_section.dart
Normal file
40
apps/gallery/lib/sections/icon_button_section.dart
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:m3e_collection/m3e_collection.dart';
|
||||
|
||||
import 'section_card.dart';
|
||||
|
||||
class IconButtonSection extends StatelessWidget {
|
||||
const IconButtonSection({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SectionCard(
|
||||
title: 'IconButtonM3E',
|
||||
subtitle: 'Generated from enums: variant × size (round shape, default width).',
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
for (final variant in IconButtonM3EVariant.values) ...[
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: Text(variant.name, style: Theme.of(context).textTheme.titleMedium),
|
||||
),
|
||||
Wrap(
|
||||
spacing: 12,
|
||||
runSpacing: 12,
|
||||
children: [
|
||||
for (final size in IconButtonM3ESize.values)
|
||||
IconButtonM3E(
|
||||
icon: const Icon(Icons.favorite),
|
||||
variant: variant,
|
||||
size: size,
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue