mirror of
https://github.com/foss42/apidash.git
synced 2025-08-06 13:51:20 +08:00
fix: bottom appbar inset padding
This commit is contained in:
@ -8,6 +8,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||||||
import '../../home_page/collection_pane.dart';
|
import '../../home_page/collection_pane.dart';
|
||||||
import '../../home_page/editor_pane/url_card.dart';
|
import '../../home_page/editor_pane/url_card.dart';
|
||||||
import '../../home_page/editor_pane/details_card/code_pane.dart';
|
import '../../home_page/editor_pane/details_card/code_pane.dart';
|
||||||
|
import '../../home_page/editor_pane/editor_default.dart';
|
||||||
import '../../common/main_editor_widgets.dart';
|
import '../../common/main_editor_widgets.dart';
|
||||||
import '../widgets/page_base.dart';
|
import '../widgets/page_base.dart';
|
||||||
import 'request_response_tabs.dart';
|
import 'request_response_tabs.dart';
|
||||||
@ -56,7 +57,9 @@ class _RequestResponsePageState extends ConsumerState<RequestResponsePage>
|
|||||||
),
|
),
|
||||||
leftDrawerContent: const CollectionPane(),
|
leftDrawerContent: const CollectionPane(),
|
||||||
actions: const [Padding(padding: kPh8, child: EnvironmentDropdown())],
|
actions: const [Padding(padding: kPh8, child: EnvironmentDropdown())],
|
||||||
mainContent: RequestResponseTabs(
|
mainContent: id == null
|
||||||
|
? const RequestEditorDefault()
|
||||||
|
: RequestResponseTabs(
|
||||||
controller: requestResponseTabController,
|
controller: requestResponseTabController,
|
||||||
),
|
),
|
||||||
bottomNavigationBar: RequestResponsePageBottombar(
|
bottomNavigationBar: RequestResponsePageBottombar(
|
||||||
@ -77,7 +80,10 @@ class RequestResponsePageBottombar extends ConsumerWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
return Container(
|
final selecetdId = ref.watch(selectedIdStateProvider);
|
||||||
|
return Padding(
|
||||||
|
padding: MediaQuery.of(context).viewInsets,
|
||||||
|
child: Container(
|
||||||
height: 60 + MediaQuery.paddingOf(context).bottom,
|
height: 60 + MediaQuery.paddingOf(context).bottom,
|
||||||
width: MediaQuery.sizeOf(context).width,
|
width: MediaQuery.sizeOf(context).width,
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
@ -103,7 +109,9 @@ class RequestResponsePageBottombar extends ConsumerWidget {
|
|||||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: selecetdId == null
|
||||||
|
? null
|
||||||
|
: () {
|
||||||
Navigator.of(context).push(
|
Navigator.of(context).push(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => const PageBase(
|
builder: (context) => const PageBase(
|
||||||
@ -126,6 +134,7 @@ class RequestResponsePageBottombar extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,6 +143,7 @@ class TwoDrawerScaffold extends StatelessWidget {
|
|||||||
return Container(
|
return Container(
|
||||||
padding: (kIsWindows || kIsMacOS) ? kPt28 : EdgeInsets.zero,
|
padding: (kIsWindows || kIsMacOS) ? kPt28 : EdgeInsets.zero,
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
key: scaffoldKey,
|
key: scaffoldKey,
|
||||||
backgroundColor: Theme.of(context).colorScheme.surface,
|
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||||
@ -189,6 +190,7 @@ class TwoDrawerScaffold extends StatelessWidget {
|
|||||||
body: mainContent,
|
body: mainContent,
|
||||||
bottomNavigationBar: bottomNavigationBar,
|
bottomNavigationBar: bottomNavigationBar,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user