Commit 60a4eec4 by tanghuan

针对Pad调整

1 parent f2d7fe14
......@@ -25,7 +25,7 @@ final GoRouter router = GoRouter(
GoRoute(
path: '/web',
builder: (BuildContext context, GoRouterState state) {
return const WebPage();
return WebPage();
},
),
GoRoute(
......
......@@ -5,7 +5,6 @@ import 'package:appframe/config/constant.dart';
import 'package:appframe/config/env_config.dart';
import 'package:appframe/config/locator.dart';
import 'package:appframe/config/routes.dart';
import 'package:appframe/ui/widgets/tip_overlay_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
......@@ -13,7 +12,9 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:webview_flutter/webview_flutter.dart';
class WebPage extends StatelessWidget {
const WebPage({super.key});
WebPage({super.key});
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
@override
Widget build(BuildContext buildContext) {
......@@ -55,6 +56,7 @@ class WebPage extends StatelessWidget {
child: BlocConsumer<WebCubit, WebState>(
builder: (ctx, state) {
final scaffold = Scaffold(
key: _scaffoldKey,
appBar: _buildAppBar(ctx, state),
endDrawer: _buildDrawer(ctx, state),
body: Stack(
......@@ -185,8 +187,9 @@ class WebPage extends StatelessWidget {
}
Drawer _buildDrawer(BuildContext ctx, WebState state) {
final screenSize = MediaQuery.of(ctx).size;
return Drawer(
width: MediaQuery.of(ctx).size.width * 0.8,
width: screenSize.width > 600 ? 400 : screenSize.width * 0.8, // Pad 上给一个固定最大宽度
child: Column(children: [
DrawerHeader(
decoration: BoxDecoration(
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!