Create Appbar Components #155
@ -5,7 +5,7 @@ import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
|||||||
part 'custom_app_bar.g.dart';
|
part 'custom_app_bar.g.dart';
|
||||||
|
|
||||||
@ComponentCopyWithExtension()
|
@ComponentCopyWithExtension()
|
||||||
class CustomAppBar extends AppBarComponent with $CustomAppBarCWMixin {
|
class CustomAppBar extends TopAppBarComponent with $CustomAppBarCWMixin {
|
||||||
const CustomAppBar({super.title, super.key});
|
const CustomAppBar({super.title, super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -6,10 +6,14 @@ part of 'custom_app_bar.dart';
|
|||||||
// ComponentCopyWithGenerator
|
// ComponentCopyWithGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy {
|
class $CustomAppBarCWProxyImpl implements $TopAppBarComponentCWProxy {
|
||||||
const $CustomAppBarCWProxyImpl(this._value);
|
const $CustomAppBarCWProxyImpl(this._value);
|
||||||
final CustomAppBar _value;
|
final CustomAppBar _value;
|
||||||
@override
|
@override
|
||||||
|
CustomAppBar title(TextWrapper? title) => this(title: title);
|
||||||
|
@override
|
||||||
|
CustomAppBar centerTitle(bool? centerTitle) => this(centerTitle: centerTitle);
|
||||||
|
@override
|
||||||
CustomAppBar shape(ShapeBorder? shape) => this(shape: shape);
|
CustomAppBar shape(ShapeBorder? shape) => this(shape: shape);
|
||||||
@override
|
@override
|
||||||
CustomAppBar systemOverlayStyle(SystemUiOverlayStyle? systemOverlayStyle) =>
|
CustomAppBar systemOverlayStyle(SystemUiOverlayStyle? systemOverlayStyle) =>
|
||||||
@ -51,20 +55,18 @@ class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy {
|
|||||||
CustomAppBar leadingWidth(double? leadingWidth) =>
|
CustomAppBar leadingWidth(double? leadingWidth) =>
|
||||||
this(leadingWidth: leadingWidth);
|
this(leadingWidth: leadingWidth);
|
||||||
@override
|
@override
|
||||||
CustomAppBar title(TextWrapper? title) => this(title: title);
|
|
||||||
@override
|
|
||||||
CustomAppBar leading(Widget? leading) => this(leading: leading);
|
CustomAppBar leading(Widget? leading) => this(leading: leading);
|
||||||
@override
|
@override
|
||||||
CustomAppBar actions(List<Widget>? actions) => this(actions: actions);
|
CustomAppBar actions(List<Widget>? actions) => this(actions: actions);
|
||||||
@override
|
@override
|
||||||
CustomAppBar centerTitle(bool? centerTitle) => this(centerTitle: centerTitle);
|
|
||||||
@override
|
|
||||||
CustomAppBar expandedWidget(List<Widget>? expandedWidget) =>
|
CustomAppBar expandedWidget(List<Widget>? expandedWidget) =>
|
||||||
this(expandedWidget: expandedWidget);
|
this(expandedWidget: expandedWidget);
|
||||||
@override
|
@override
|
||||||
CustomAppBar key(Key? key) => this(key: key);
|
CustomAppBar key(Key? key) => this(key: key);
|
||||||
@override
|
@override
|
||||||
CustomAppBar call({
|
CustomAppBar call({
|
||||||
|
TextWrapper? title,
|
||||||
|
bool? centerTitle,
|
||||||
ShapeBorder? shape,
|
ShapeBorder? shape,
|
||||||
SystemUiOverlayStyle? systemOverlayStyle,
|
SystemUiOverlayStyle? systemOverlayStyle,
|
||||||
bool? automaticallyImplyLeading,
|
bool? automaticallyImplyLeading,
|
||||||
@ -80,10 +82,8 @@ class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy {
|
|||||||
bool? excludeHeaderSemantics,
|
bool? excludeHeaderSemantics,
|
||||||
double? toolbarHeight,
|
double? toolbarHeight,
|
||||||
double? leadingWidth,
|
double? leadingWidth,
|
||||||
TextWrapper? title,
|
|
||||||
Widget? leading,
|
Widget? leading,
|
||||||
List<Widget>? actions,
|
List<Widget>? actions,
|
||||||
bool? centerTitle,
|
|
||||||
List<Widget>? expandedWidget,
|
List<Widget>? expandedWidget,
|
||||||
Key? key,
|
Key? key,
|
||||||
}) =>
|
}) =>
|
||||||
@ -94,6 +94,6 @@ class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mixin $CustomAppBarCWMixin on Component {
|
mixin $CustomAppBarCWMixin on Component {
|
||||||
$AppBarComponentCWProxy get copyWith =>
|
$TopAppBarComponentCWProxy get copyWith =>
|
||||||
$CustomAppBarCWProxyImpl(this as CustomAppBar);
|
$CustomAppBarCWProxyImpl(this as CustomAppBar);
|
||||||
}
|
}
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'app_bar_component.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// ComponentProxyGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
abstract class $AppBarComponentCWProxy {
|
|
||||||
AppBarComponent shape(ShapeBorder? shape);
|
|
||||||
AppBarComponent systemOverlayStyle(SystemUiOverlayStyle? systemOverlayStyle);
|
|
||||||
AppBarComponent automaticallyImplyLeading(bool? automaticallyImplyLeading);
|
|
||||||
AppBarComponent flexibleSpace(Widget? flexibleSpace);
|
|
||||||
AppBarComponent bottom(PreferredSizeWidget? bottom);
|
|
||||||
AppBarComponent elevation(double? elevation);
|
|
||||||
AppBarComponent scrolledUnderElevation(double? scrolledUnderElevation);
|
|
||||||
AppBarComponent shadowColor(Color? shadowColor);
|
|
||||||
AppBarComponent surfaceTintColor(Color? surfaceTintColor);
|
|
||||||
AppBarComponent backgroundColor(MultiColor? backgroundColor);
|
|
||||||
AppBarComponent iconTheme(IconThemeData? iconTheme);
|
|
||||||
AppBarComponent primary(bool? primary);
|
|
||||||
AppBarComponent excludeHeaderSemantics(bool? excludeHeaderSemantics);
|
|
||||||
AppBarComponent toolbarHeight(double? toolbarHeight);
|
|
||||||
AppBarComponent leadingWidth(double? leadingWidth);
|
|
||||||
AppBarComponent title(TextWrapper? title);
|
|
||||||
AppBarComponent leading(Widget? leading);
|
|
||||||
AppBarComponent actions(List<Widget>? actions);
|
|
||||||
AppBarComponent centerTitle(bool? centerTitle);
|
|
||||||
AppBarComponent expandedWidget(List<Widget>? expandedWidget);
|
|
||||||
AppBarComponent key(Key? key);
|
|
||||||
AppBarComponent call({
|
|
||||||
ShapeBorder? shape,
|
|
||||||
SystemUiOverlayStyle? systemOverlayStyle,
|
|
||||||
bool? automaticallyImplyLeading,
|
|
||||||
Widget? flexibleSpace,
|
|
||||||
PreferredSizeWidget? bottom,
|
|
||||||
double? elevation,
|
|
||||||
double? scrolledUnderElevation,
|
|
||||||
Color? shadowColor,
|
|
||||||
Color? surfaceTintColor,
|
|
||||||
MultiColor? backgroundColor,
|
|
||||||
IconThemeData? iconTheme,
|
|
||||||
bool? primary,
|
|
||||||
bool? excludeHeaderSemantics,
|
|
||||||
double? toolbarHeight,
|
|
||||||
double? leadingWidth,
|
|
||||||
TextWrapper? title,
|
|
||||||
Widget? leading,
|
|
||||||
List<Widget>? actions,
|
|
||||||
bool? centerTitle,
|
|
||||||
List<Widget>? expandedWidget,
|
|
||||||
Key? key,
|
|
||||||
});
|
|
||||||
}
|
|
@ -14,6 +14,6 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
export './app_bar_component.dart';
|
export 'top_app_bar_component.dart';
|
||||||
export './bottom_navigation_bar_component.dart';
|
export './bottom_navigation_bar_component.dart';
|
||||||
export './top_navigation_bar_component.dart';
|
export './top_navigation_bar_component.dart';
|
||||||
|
@ -20,12 +20,12 @@ import 'package:wyatt_component_copy_with_extension/component_copy_with_extensio
|
|||||||
import 'package:wyatt_ui_components/src/domain/entities/bars/top_bar_component.dart';
|
import 'package:wyatt_ui_components/src/domain/entities/bars/top_bar_component.dart';
|
||||||
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||||
|
|
||||||
part 'app_bar_component.g.dart';
|
part 'top_app_bar_component.g.dart';
|
||||||
|
|
||||||
@ComponentProxyExtension()
|
@ComponentProxyExtension()
|
||||||
abstract class AppBarComponent extends TopBarComponent
|
abstract class TopAppBarComponent extends TopBarComponent
|
||||||
with CopyWithMixin<$AppBarComponentCWProxy> {
|
with CopyWithMixin<$TopAppBarComponentCWProxy> {
|
||||||
const AppBarComponent({
|
const TopAppBarComponent({
|
||||||
this.title,
|
this.title,
|
||||||
this.centerTitle,
|
this.centerTitle,
|
||||||
super.shape,
|
super.shape,
|
@ -0,0 +1,55 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'top_app_bar_component.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentProxyGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
abstract class $TopAppBarComponentCWProxy {
|
||||||
|
TopAppBarComponent title(TextWrapper? title);
|
||||||
|
TopAppBarComponent centerTitle(bool? centerTitle);
|
||||||
|
TopAppBarComponent shape(ShapeBorder? shape);
|
||||||
|
TopAppBarComponent systemOverlayStyle(
|
||||||
|
SystemUiOverlayStyle? systemOverlayStyle);
|
||||||
|
TopAppBarComponent automaticallyImplyLeading(bool? automaticallyImplyLeading);
|
||||||
|
TopAppBarComponent flexibleSpace(Widget? flexibleSpace);
|
||||||
|
TopAppBarComponent bottom(PreferredSizeWidget? bottom);
|
||||||
|
TopAppBarComponent elevation(double? elevation);
|
||||||
|
TopAppBarComponent scrolledUnderElevation(double? scrolledUnderElevation);
|
||||||
|
TopAppBarComponent shadowColor(Color? shadowColor);
|
||||||
|
TopAppBarComponent surfaceTintColor(Color? surfaceTintColor);
|
||||||
|
TopAppBarComponent backgroundColor(MultiColor? backgroundColor);
|
||||||
|
TopAppBarComponent iconTheme(IconThemeData? iconTheme);
|
||||||
|
TopAppBarComponent primary(bool? primary);
|
||||||
|
TopAppBarComponent excludeHeaderSemantics(bool? excludeHeaderSemantics);
|
||||||
|
TopAppBarComponent toolbarHeight(double? toolbarHeight);
|
||||||
|
TopAppBarComponent leadingWidth(double? leadingWidth);
|
||||||
|
TopAppBarComponent leading(Widget? leading);
|
||||||
|
TopAppBarComponent actions(List<Widget>? actions);
|
||||||
|
TopAppBarComponent expandedWidget(List<Widget>? expandedWidget);
|
||||||
|
TopAppBarComponent key(Key? key);
|
||||||
|
TopAppBarComponent call({
|
||||||
|
TextWrapper? title,
|
||||||
|
bool? centerTitle,
|
||||||
|
ShapeBorder? shape,
|
||||||
|
SystemUiOverlayStyle? systemOverlayStyle,
|
||||||
|
bool? automaticallyImplyLeading,
|
||||||
|
Widget? flexibleSpace,
|
||||||
|
PreferredSizeWidget? bottom,
|
||||||
|
double? elevation,
|
||||||
|
double? scrolledUnderElevation,
|
||||||
|
Color? shadowColor,
|
||||||
|
Color? surfaceTintColor,
|
||||||
|
MultiColor? backgroundColor,
|
||||||
|
IconThemeData? iconTheme,
|
||||||
|
bool? primary,
|
||||||
|
bool? excludeHeaderSemantics,
|
||||||
|
double? toolbarHeight,
|
||||||
|
double? leadingWidth,
|
||||||
|
Widget? leading,
|
||||||
|
List<Widget>? actions,
|
||||||
|
List<Widget>? expandedWidget,
|
||||||
|
Key? key,
|
||||||
|
});
|
||||||
|
}
|
@ -17,22 +17,37 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||||
import 'package:wyatt_ui_components/src/core/mixins/copy_with_mixin.dart';
|
import 'package:wyatt_ui_components/src/core/mixins/copy_with_mixin.dart';
|
||||||
import 'package:wyatt_ui_components/src/domain/entities/component.dart';
|
import 'package:wyatt_ui_components/src/domain/entities/bars/top_bar_component.dart';
|
||||||
|
|
||||||
part 'top_navigation_bar_component.g.dart';
|
part 'top_navigation_bar_component.g.dart';
|
||||||
|
|
||||||
@ComponentProxyExtension()
|
@ComponentProxyExtension()
|
||||||
abstract class TopNavigationBarComponent extends Component
|
abstract class TopNavigationBarComponent extends TopBarComponent
|
||||||
with CopyWithMixin<$TopNavigationBarComponentCWProxy> {
|
with CopyWithMixin<$TopNavigationBarComponentCWProxy> {
|
||||||
const TopNavigationBarComponent({
|
const TopNavigationBarComponent({
|
||||||
this.leading,
|
|
||||||
this.actions,
|
|
||||||
this.onTap,
|
this.onTap,
|
||||||
this.currentIndex = 0,
|
this.currentIndex = 0,
|
||||||
|
super.shape,
|
||||||
|
super.systemOverlayStyle,
|
||||||
|
super.automaticallyImplyLeading,
|
||||||
|
super.flexibleSpace,
|
||||||
|
super.bottom,
|
||||||
|
super.elevation,
|
||||||
|
super.scrolledUnderElevation,
|
||||||
|
super.shadowColor,
|
||||||
|
super.surfaceTintColor,
|
||||||
|
super.backgroundColor,
|
||||||
|
super.iconTheme,
|
||||||
|
super.primary,
|
||||||
|
super.excludeHeaderSemantics,
|
||||||
|
super.toolbarHeight,
|
||||||
|
super.leadingWidth,
|
||||||
|
super.leading,
|
||||||
|
super.actions,
|
||||||
|
super.expandedWidget,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
final int currentIndex;
|
final int currentIndex;
|
||||||
final void Function(BuildContext, int)? onTap;
|
final void Function(BuildContext, int)? onTap;
|
||||||
final Widget? leading;
|
|
||||||
final List<Widget>? actions;
|
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ class ComponentThemeData {
|
|||||||
this.quoteCardComponent,
|
this.quoteCardComponent,
|
||||||
this.skillCardComponent,
|
this.skillCardComponent,
|
||||||
});
|
});
|
||||||
final AppBarComponent? appBar;
|
final TopAppBarComponent? appBar;
|
||||||
|
|
||||||
final TopNavigationBarComponent? topNavigationBarComponent;
|
final TopNavigationBarComponent? topNavigationBarComponent;
|
||||||
final BottomNavigationBarComponent? bottomNavigationBar;
|
final BottomNavigationBarComponent? bottomNavigationBar;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user