Refactor packages using new components feature #163

Merged
hugo merged 7 commits from refactor/ui_layout-ui_bloc_layout/adapt-layouts-using-new-components-features into master 2023-02-28 15:42:37 +00:00
Showing only changes of commit 7c97417233 - Show all commits

View File

@ -20,11 +20,16 @@ import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
mixin GridLayoutMixin<SuccessType extends Object?> { mixin GridLayoutMixin<SuccessType extends Object?> {
Widget gridChild(BuildContext context, SuccessType? successType); Widget gridChild(BuildContext context, SuccessType? successType);
double get verticalGap => 30;
double get horizontalGap => 30;
Widget successBuilder( Widget successBuilder(
BuildContext context, BuildContext context,
CrudListLoaded<SuccessType> state, CrudListLoaded<SuccessType> state,
) => ) =>
GridLayout( GridLayout(
verticalGap: verticalGap,
horizontalGap: horizontalGap,
children: state.data.map((e) => gridChild(context, e)).toList(), children: state.data.map((e) => gridChild(context, e)).toList(),
); );
} }