forked from mirrors/material_3_expressive
Add global WIDGETBOOK-INDEX.md and refactor use case method names for consistency across components
This commit is contained in:
parent
80ca8f665a
commit
f135a6a5f7
10 changed files with 49 additions and 19 deletions
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:loading_indicator_m3e/loading_indicator_m3e.dart';
|
||||
import 'package:material_new_shapes/material_new_shapes.dart';
|
||||
|
|
@ -23,9 +21,17 @@ List<RoundedPolygon> _polygonSet(String id) {
|
|||
case 'cookie→oval':
|
||||
return [MaterialShapes.cookie9Sided, MaterialShapes.oval];
|
||||
case 'softBurst→pill→sunny':
|
||||
return [MaterialShapes.softBurst, MaterialShapes.pill, MaterialShapes.sunny];
|
||||
return [
|
||||
MaterialShapes.softBurst,
|
||||
MaterialShapes.pill,
|
||||
MaterialShapes.sunny
|
||||
];
|
||||
case 'triangle→square→pentagon':
|
||||
return [MaterialShapes.triangle, MaterialShapes.square, MaterialShapes.pentagon];
|
||||
return [
|
||||
MaterialShapes.triangle,
|
||||
MaterialShapes.square,
|
||||
MaterialShapes.pentagon
|
||||
];
|
||||
default:
|
||||
return [
|
||||
MaterialShapes.softBurst,
|
||||
|
|
@ -120,7 +126,9 @@ Widget buildExpressiveLoadingIndicatorColorAndSemanticsUseCase(
|
|||
);
|
||||
}
|
||||
|
||||
@UseCase(name: 'edge: invalid polygons (debug assert)', type: ExpressiveLoadingIndicator)
|
||||
@UseCase(
|
||||
name: 'edge: invalid polygons (debug assert)',
|
||||
type: ExpressiveLoadingIndicator)
|
||||
Widget buildExpressiveLoadingIndicatorInvalidPolygonsUseCase(
|
||||
BuildContext context) {
|
||||
final enableInvalid = context.knobs.boolean(
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ List<RoundedPolygon> _polygonSet(String id) {
|
|||
}
|
||||
|
||||
@UseCase(name: 'default', type: LoadingIndicatorM3E)
|
||||
Widget buildLoadingIndicatorM3EUseCase(BuildContext context) {
|
||||
Widget buildLoadingIndicatorM3EDefaultUseCase(BuildContext context) {
|
||||
// Keep defaults: tokens-based sizing and colors, subtle container.
|
||||
return const Center(
|
||||
child: LoadingIndicatorM3E(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue