feat(bloc_layout): add attributs available for grid bloc layouts
This commit is contained in:
parent
3f5acd982c
commit
c47d940224
@ -20,11 +20,16 @@ import 'package:wyatt_bloc_layout/wyatt_bloc_layout.dart';
|
||||
mixin GridLayoutMixin<SuccessType extends Object?> {
|
||||
Widget gridChild(BuildContext context, SuccessType? successType);
|
||||
|
||||
double get verticalGap => 30;
|
||||
double get horizontalGap => 30;
|
||||
|
||||
Widget successBuilder(
|
||||
BuildContext context,
|
||||
CrudListLoaded<SuccessType> state,
|
||||
) =>
|
||||
GridLayout(
|
||||
verticalGap: verticalGap,
|
||||
horizontalGap: horizontalGap,
|
||||
children: state.data.map((e) => gridChild(context, e)).toList(),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user