fix scaffold appBar height without appBarBottom

null_safety
小赖 4 years ago
parent 90e6e47b59
commit 1895a9a8c8

@ -1,5 +1,6 @@
import 'package:ansu_ui/ansu_ui.dart'; import 'package:ansu_ui/ansu_ui.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart';
class ExampleScaffold extends StatefulWidget { class ExampleScaffold extends StatefulWidget {
ExampleScaffold({Key key}) : super(key: key); ExampleScaffold({Key key}) : super(key: key);
@ -48,7 +49,18 @@ class _ExampleScaffoldState extends State<ExampleScaffold>
child: Text('open drawer'), child: Text('open drawer'),
); );
}, },
) ),
TextButton(
onPressed: () {
Get.dialog(
ASScaffold(
title: '框架 Scaffold',
),
useSafeArea: false,
);
},
child: Text('open drawer'),
),
], ],
), ),
); );

@ -76,7 +76,11 @@ class _ASScaffoldState extends State<ASScaffold> {
? Text(widget.title) ? Text(widget.title)
: widget.title ?? SizedBox(), : widget.title ?? SizedBox(),
), ),
bottom: widget.appBarBottom, bottom: widget.appBarBottom ??
PreferredSize(
child: SizedBox(),
preferredSize: Size.fromHeight(0),
),
), ),
body: widget.body, body: widget.body,
); );

Loading…
Cancel
Save