Skip to content

Commit

Permalink
Enable AtutoTabsScaffold to support custom appbar
Browse files Browse the repository at this point in the history
  • Loading branch information
wer-mathurin committed May 17, 2021
1 parent 6ed33c4 commit 37f63a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
auto_route/pubspec.lock
auto_route/example/pubspec.lock
auto_route_generator/pubspec.lock
11 changes: 4 additions & 7 deletions auto_route/lib/src/router/widgets/auto_tabs_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

typedef AutoTabsBuilder = Widget Function(
typedef AutoTabsBuilder = PreferredSize Function(
BuildContext context, TabsRouter tabsRouter);

class AutoTabsScaffold extends StatelessWidget {
Expand Down Expand Up @@ -108,12 +108,9 @@ class AutoTabsScaffold extends StatelessWidget {
primary: primary,
appBar: appBarBuilder == null
? null
: PreferredSize(
child: appBarBuilder!(
context,
tabsRouter,
),
preferredSize: Size.fromHeight(kToolbarHeight),
: appBarBuilder!(
context,
tabsRouter,
),
body: builder == null
? FadeTransition(opacity: animation, child: child)
Expand Down

0 comments on commit 37f63a9

Please sign in to comment.