Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
appframe
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 60a4eec4
authored
2026-01-27 13:50:26 +0800
by
tanghuan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
针对Pad调整
1 parent
f2d7fe14
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
lib/config/routes.dart
lib/ui/pages/web_page.dart
lib/config/routes.dart
View file @
60a4eec
...
@@ -25,7 +25,7 @@ final GoRouter router = GoRouter(
...
@@ -25,7 +25,7 @@ final GoRouter router = GoRouter(
GoRoute
(
GoRoute
(
path:
'/web'
,
path:
'/web'
,
builder:
(
BuildContext
context
,
GoRouterState
state
)
{
builder:
(
BuildContext
context
,
GoRouterState
state
)
{
return
const
WebPage
();
return
WebPage
();
},
},
),
),
GoRoute
(
GoRoute
(
...
...
lib/ui/pages/web_page.dart
View file @
60a4eec
...
@@ -5,7 +5,6 @@ import 'package:appframe/config/constant.dart';
...
@@ -5,7 +5,6 @@ import 'package:appframe/config/constant.dart';
import
'package:appframe/config/env_config.dart'
;
import
'package:appframe/config/env_config.dart'
;
import
'package:appframe/config/locator.dart'
;
import
'package:appframe/config/locator.dart'
;
import
'package:appframe/config/routes.dart'
;
import
'package:appframe/config/routes.dart'
;
import
'package:appframe/ui/widgets/tip_overlay_widget.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:go_router/go_router.dart'
;
import
'package:go_router/go_router.dart'
;
...
@@ -13,7 +12,9 @@ import 'package:shared_preferences/shared_preferences.dart';
...
@@ -13,7 +12,9 @@ import 'package:shared_preferences/shared_preferences.dart';
import
'package:webview_flutter/webview_flutter.dart'
;
import
'package:webview_flutter/webview_flutter.dart'
;
class
WebPage
extends
StatelessWidget
{
class
WebPage
extends
StatelessWidget
{
const
WebPage
({
super
.
key
});
WebPage
({
super
.
key
});
final
GlobalKey
<
ScaffoldState
>
_scaffoldKey
=
GlobalKey
<
ScaffoldState
>();
@override
@override
Widget
build
(
BuildContext
buildContext
)
{
Widget
build
(
BuildContext
buildContext
)
{
...
@@ -55,6 +56,7 @@ class WebPage extends StatelessWidget {
...
@@ -55,6 +56,7 @@ class WebPage extends StatelessWidget {
child:
BlocConsumer
<
WebCubit
,
WebState
>(
child:
BlocConsumer
<
WebCubit
,
WebState
>(
builder:
(
ctx
,
state
)
{
builder:
(
ctx
,
state
)
{
final
scaffold
=
Scaffold
(
final
scaffold
=
Scaffold
(
key:
_scaffoldKey
,
appBar:
_buildAppBar
(
ctx
,
state
),
appBar:
_buildAppBar
(
ctx
,
state
),
endDrawer:
_buildDrawer
(
ctx
,
state
),
endDrawer:
_buildDrawer
(
ctx
,
state
),
body:
Stack
(
body:
Stack
(
...
@@ -185,8 +187,9 @@ class WebPage extends StatelessWidget {
...
@@ -185,8 +187,9 @@ class WebPage extends StatelessWidget {
}
}
Drawer
_buildDrawer
(
BuildContext
ctx
,
WebState
state
)
{
Drawer
_buildDrawer
(
BuildContext
ctx
,
WebState
state
)
{
final
screenSize
=
MediaQuery
.
of
(
ctx
).
size
;
return
Drawer
(
return
Drawer
(
width:
MediaQuery
.
of
(
ctx
).
size
.
width
*
0.8
,
width:
screenSize
.
width
>
600
?
400
:
screenSize
.
width
*
0.8
,
// Pad 上给一个固定最大宽度
child:
Column
(
children:
[
child:
Column
(
children:
[
DrawerHeader
(
DrawerHeader
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment