refactor : base page
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/app_bar.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/back_ground.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class ChickenBasePage extends GetView<BaseLogic> {
|
||||
@@ -25,8 +26,8 @@ class ChickenBasePage extends GetView<BaseLogic> {
|
||||
this.scrollable = false,
|
||||
this.floatingActionButtonLocation,
|
||||
this.floatingActionButton,
|
||||
|
||||
this.filteringWidget,
|
||||
this.backGroundWidget,
|
||||
}) : assert(
|
||||
(routes != null) || routesWidget != null,
|
||||
'Either routes or routesWidget must be provided.',
|
||||
@@ -58,6 +59,8 @@ class ChickenBasePage extends GetView<BaseLogic> {
|
||||
final Widget? filteringWidget;
|
||||
final void Function(String?)? onSearchChanged;
|
||||
|
||||
final BackGroundWidget? backGroundWidget;
|
||||
|
||||
void _onFilterTap() {
|
||||
if (hasFilter && filteringWidget != null) {
|
||||
final currentRoute = ModalRoute.of(Get.context!);
|
||||
@@ -82,6 +85,7 @@ class ChickenBasePage extends GetView<BaseLogic> {
|
||||
scrollable: scrollable,
|
||||
floatingActionButtonLocation: floatingActionButtonLocation,
|
||||
floatingActionButton: floatingActionButton,
|
||||
backGroundWidget: backGroundWidget ?? chickenBackground(),
|
||||
appBar: chickenAppBar(
|
||||
isBase: isBase,
|
||||
hasBack: isBase ? false : hasBack,
|
||||
|
||||
Reference in New Issue
Block a user