feat: update layouts to allow more control on components

This commit is contained in:
2023-02-28 15:42:02 +00:00
committed by Gitea
parent 3a59230bce
commit 4029d4de03
44 changed files with 1391 additions and 60 deletions
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
@@ -1,13 +1,14 @@
import 'package:flutter/material.dart';
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
import 'package:wyatt_ui_layout/wyatt_wyatt_ui_layout.dart';
class AppBarLayoutPage extends StatelessWidget {
const AppBarLayoutPage({super.key});
@override
Widget build(BuildContext context) => const AppBarLayout(
title: 'App Bar Layout',
body: Center(
Widget build(BuildContext context) => TopAppBarLayout(
custom: (p0) => p0?.copyWith.call(title: 'New Title'.wrap()),
body: const Center(
child: Text(
'Body',
),
@@ -7,8 +7,7 @@ class AvailabaleLayouts extends StatelessWidget {
const AvailabaleLayouts({super.key});
@override
Widget build(BuildContext context) => AppBarLayout(
title: 'Available Layouts',
Widget build(BuildContext context) => TopAppBarLayout(
body: Center(
child: SingleChildScrollView(
physics: const BouncingScrollPhysics(),
@@ -5,10 +5,9 @@ class BottomNavigationBarLayoutPage1 extends StatelessWidget {
const BottomNavigationBarLayoutPage1({super.key});
@override
Widget build(BuildContext context) => const BottomNavigationBarLayout(
currentIndex: 0,
body: AppBarLayout(
title: 'Bottom Bar Navigation Layout',
Widget build(BuildContext context) => BottomNavigationBarLayout(
custom: (p0) => p0?.copyWith.call(currentIndex: 0),
body: const TopAppBarLayout(
body: Center(
child: Text('Body'),
),
@@ -5,10 +5,9 @@ class BottomNavigationBarLayoutPage2 extends StatelessWidget {
const BottomNavigationBarLayoutPage2({super.key});
@override
Widget build(BuildContext context) => const BottomNavigationBarLayout(
currentIndex: 1,
body: AppBarLayout(
title: 'Bottom Bar Navigation Layout',
Widget build(BuildContext context) => BottomNavigationBarLayout(
custom: (p0) => p0?.copyWith.currentIndex(1),
body: const TopAppBarLayout(
body: Center(
child: Text('Body'),
),