Skip to content

Commit

Permalink
Commit from GitHub Actions (Forui Samples Presubmit)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante committed Jul 31, 2024
1 parent 4456154 commit 21c0be3
Showing 1 changed file with 81 additions and 82 deletions.
163 changes: 81 additions & 82 deletions samples/lib/widgets/resizable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,33 @@ class CascadingResizablePage extends SampleScaffold {

@override
Widget child(BuildContext context) => DecoratedBox(
decoration: BoxDecoration(
border: Border.all(color: context.theme.colorScheme.border),
borderRadius: BorderRadius.circular(8),
),
child: FResizable(
axis: Axis.vertical,
controller: FResizableController.cascade(),
crossAxisExtent: 300,
children: [
FResizableRegion(
initialExtent: 250,
minExtent: 100,
builder: (_, data, __) => Label(data: data, icon: FAssets.icons.sunrise, label: 'Morning'),
),
FResizableRegion(
initialExtent: 100,
minExtent: 100,
builder: (_, data, __) => Label(data: data, icon: FAssets.icons.sun, label: 'Afternoon'),
decoration: BoxDecoration(
border: Border.all(color: context.theme.colorScheme.border),
borderRadius: BorderRadius.circular(8),
),
FResizableRegion(
initialExtent: 250,
minExtent: 100,
builder: (_, data, __) => Label(data: data, icon: FAssets.icons.sunset, label: 'Evening'),
child: FResizable(
axis: Axis.vertical,
controller: FResizableController.cascade(),
crossAxisExtent: 300,
children: [
FResizableRegion(
initialExtent: 250,
minExtent: 100,
builder: (_, data, __) => Label(data: data, icon: FAssets.icons.sunrise, label: 'Morning'),
),
FResizableRegion(
initialExtent: 100,
minExtent: 100,
builder: (_, data, __) => Label(data: data, icon: FAssets.icons.sun, label: 'Afternoon'),
),
FResizableRegion(
initialExtent: 250,
minExtent: 100,
builder: (_, data, __) => Label(data: data, icon: FAssets.icons.sunset, label: 'Evening'),
),
],
),
],
),
);

);
}

class Label extends StatelessWidget {
Expand Down Expand Up @@ -134,20 +133,20 @@ class HorizontalResizablePage extends SampleScaffold {

@override
Widget child(BuildContext context) => DecoratedBox(
decoration: BoxDecoration(
border: Border.all(color: context.theme.colorScheme.border),
borderRadius: BorderRadius.circular(8),
),
child: FResizable(
decoration: BoxDecoration(
border: Border.all(color: context.theme.colorScheme.border),
borderRadius: BorderRadius.circular(8),
),
child: FResizable(
axis: Axis.horizontal,
crossAxisExtent: 300,
children: [
FResizableRegion(
initialExtent: 100,
minExtent: 100,
builder: (context, data, _) => Align(
child: Text('Sidebar', style: context.theme.typography.sm),
),
child: Text('Sidebar', style: context.theme.typography.sm),
),
),
FResizableRegion(
initialExtent: 300,
Expand All @@ -158,7 +157,7 @@ class HorizontalResizablePage extends SampleScaffold {
),
],
),
);
);
}

@RoutePage()
Expand All @@ -169,32 +168,32 @@ class ThumbResizablePage extends SampleScaffold {

@override
Widget child(BuildContext context) => DecoratedBox(
decoration: BoxDecoration(
border: Border.all(color: context.theme.colorScheme.border),
borderRadius: BorderRadius.circular(8),
),
child: FResizable(
axis: Axis.horizontal,
divider: FResizableDivider.dividerThumb,
crossAxisExtent: 300,
children: [
FResizableRegion(
initialExtent: 100,
minExtent: 100,
builder: (context, data, _) => Align(
child: Text('Sidebar', style: context.theme.typography.sm),
),
decoration: BoxDecoration(
border: Border.all(color: context.theme.colorScheme.border),
borderRadius: BorderRadius.circular(8),
),
FResizableRegion(
initialExtent: 300,
minExtent: 100,
builder: (context, data, _) => Align(
child: Text('Content', style: context.theme.typography.sm),
),
child: FResizable(
axis: Axis.horizontal,
divider: FResizableDivider.dividerThumb,
crossAxisExtent: 300,
children: [
FResizableRegion(
initialExtent: 100,
minExtent: 100,
builder: (context, data, _) => Align(
child: Text('Sidebar', style: context.theme.typography.sm),
),
),
FResizableRegion(
initialExtent: 300,
minExtent: 100,
builder: (context, data, _) => Align(
child: Text('Content', style: context.theme.typography.sm),
),
),
],
),
],
),
);
);
}

@RoutePage()
Expand All @@ -205,30 +204,30 @@ class NoDividerResizablePage extends SampleScaffold {

@override
Widget child(BuildContext context) => DecoratedBox(
decoration: BoxDecoration(
border: Border.all(color: context.theme.colorScheme.border),
borderRadius: BorderRadius.circular(8),
),
child: FResizable(
axis: Axis.horizontal,
divider: FResizableDivider.none,
crossAxisExtent: 300,
children: [
FResizableRegion(
initialExtent: 100,
minExtent: 100,
builder: (context, data, _) => Align(
child: Text('Sidebar', style: context.theme.typography.sm),
),
decoration: BoxDecoration(
border: Border.all(color: context.theme.colorScheme.border),
borderRadius: BorderRadius.circular(8),
),
FResizableRegion(
initialExtent: 300,
minExtent: 100,
builder: (context, data, _) => Align(
child: Text('Content', style: context.theme.typography.sm),
),
child: FResizable(
axis: Axis.horizontal,
divider: FResizableDivider.none,
crossAxisExtent: 300,
children: [
FResizableRegion(
initialExtent: 100,
minExtent: 100,
builder: (context, data, _) => Align(
child: Text('Sidebar', style: context.theme.typography.sm),
),
),
FResizableRegion(
initialExtent: 300,
minExtent: 100,
builder: (context, data, _) => Align(
child: Text('Content', style: context.theme.typography.sm),
),
),
],
),
],
),
);
);
}

0 comments on commit 21c0be3

Please sign in to comment.