ui_components/feat/update-appbarr-component #91
| @ -18,7 +18,9 @@ class CustomAppBar extends AppBarComponent { | ||||
|       ); | ||||
| 
 | ||||
|   @override | ||||
|   AppBarComponent configure({String? title}) => CustomAppBar( | ||||
|   AppBarComponent configure( | ||||
|           {String? title, Widget? leading, List<Widget>? actions}) => | ||||
|       CustomAppBar( | ||||
|         title: title ?? this.title, | ||||
|       ); | ||||
| } | ||||
|  | ||||
| @ -10,7 +10,9 @@ class CustomAppBar extends AppBarComponent { | ||||
|       ); | ||||
| 
 | ||||
|   @override | ||||
|   AppBarComponent configure({String? title}) => CustomAppBar( | ||||
|   AppBarComponent configure( | ||||
|           {String? title, Widget? leading, List<Widget>? actions}) => | ||||
|       CustomAppBar( | ||||
|         title: title ?? this.title, | ||||
|       ); | ||||
| } | ||||
|  | ||||
| @ -1,3 +1,19 @@ | ||||
| // Copyright (C) 2022 WYATT GROUP | ||||
| // Please see the AUTHORS file for details. | ||||
| // | ||||
| // This program is free software: you can redistribute it and/or modify | ||||
| // it under the terms of the GNU General Public License as published by | ||||
| // the Free Software Foundation, either version 3 of the License, or | ||||
| // any later version. | ||||
| // | ||||
| // This program is distributed in the hope that it will be useful, | ||||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
| // GNU General Public License for more details. | ||||
| // | ||||
| // You should have received a copy of the GNU General Public License | ||||
| // along with this program. If not, see <https://www.gnu.org/licenses/>. | ||||
| 
 | ||||
| import 'package:flutter/material.dart'; | ||||
| 
 | ||||
| abstract class Component extends StatelessWidget { | ||||
|  | ||||
| @ -19,10 +19,21 @@ import 'package:wyatt_ui_components/src/domain/entities/component.dart'; | ||||
| 
 | ||||
| abstract class AppBarComponent extends Component { | ||||
|   final String? title; | ||||
|   const AppBarComponent({this.title, super.key}); | ||||
|   final Widget? leading; | ||||
|   final List<Widget>? actions; | ||||
|   const AppBarComponent({ | ||||
|     this.title, | ||||
|     this.leading, | ||||
|     this.actions, | ||||
|     super.key, | ||||
|   }); | ||||
| 
 | ||||
|   @override | ||||
|   AppBarComponent configure({String? title}); | ||||
|   AppBarComponent configure({ | ||||
|     String? title, | ||||
|     Widget? leading, | ||||
|     List<Widget>? actions, | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| abstract class BottomNavigationBarComponent extends Component { | ||||
|  | ||||
| @ -13,7 +13,12 @@ class CustomAppBar extends AppBarComponent { | ||||
|       ); | ||||
| 
 | ||||
|   @override | ||||
|   AppBarComponent configure({String? title}) => CustomAppBar( | ||||
|   AppBarComponent configure({ | ||||
|     String? title, | ||||
|     Widget? leading, | ||||
|     List<Widget>? actions, | ||||
|   }) => | ||||
|       CustomAppBar( | ||||
|         title: title ?? this.title, | ||||
|       ); | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user