master #81

Closed
malo wants to merge 322 commits from master into feat/bloc_layout/new-package
4 changed files with 14 additions and 14 deletions
Showing only changes of commit 81a7ca5a1f - Show all commits

View File

@ -50,7 +50,7 @@ class Home extends StatelessWidget {
Widget build(BuildContext context) => Scaffold(
appBar: PreferredSize(
preferredSize: const Size.fromHeight(60),
child: context.components.appBar.configure(title: 'Example title'),
child: context.components.appBar?.configure(title: 'Example title'),
),
body: Column(
children: [

View File

@ -19,5 +19,5 @@ import 'package:flutter/material.dart';
abstract class Component extends StatelessWidget {
const Component({super.key});
Component configure();
Component? configure();
}

View File

@ -29,7 +29,7 @@ abstract class AppBarComponent extends Component {
});
@override
AppBarComponent configure({
AppBarComponent? configure({
String? title,
Widget? leading,
List<Widget>? actions,
@ -46,7 +46,7 @@ abstract class BottomNavigationBarComponent extends Component {
});
@override
BottomNavigationBarComponent configure({
BottomNavigationBarComponent? configure({
void Function(BuildContext, int)? onTap,
int currentIndex = 0,
});
@ -57,7 +57,7 @@ abstract class ErrorWidgetComponent extends Component {
const ErrorWidgetComponent({required this.error, super.key});
@override
ErrorWidgetComponent configure({String? error});
ErrorWidgetComponent? configure({String? error});
}
abstract class LoadingWidgetComponent extends Component {
@ -65,5 +65,5 @@ abstract class LoadingWidgetComponent extends Component {
const LoadingWidgetComponent({required this.color, super.key});
@override
LoadingWidgetComponent configure({Color? color});
LoadingWidgetComponent? configure({Color? color});
}

View File

@ -17,15 +17,15 @@
import 'package:wyatt_ui_components/src/domain/entities/components.dart';
class ComponentThemeData {
final AppBarComponent appBar;
final BottomNavigationBarComponent bottomNavigationBar;
final ErrorWidgetComponent errorWidget;
final LoadingWidgetComponent loadingWidget;
final AppBarComponent? appBar;
final BottomNavigationBarComponent? bottomNavigationBar;
final ErrorWidgetComponent? errorWidget;
final LoadingWidgetComponent? loadingWidget;
const ComponentThemeData.raw({
required this.appBar,
required this.bottomNavigationBar,
required this.errorWidget,
required this.loadingWidget,
this.appBar,
this.bottomNavigationBar,
this.errorWidget,
this.loadingWidget,
});
}