This commit is contained in:
bluesea 2024-05-14 19:04:37 +08:00
parent 281ceae9e5
commit 33537c10fd
6 changed files with 27 additions and 12 deletions

View File

@ -41,4 +41,9 @@
<data android:mimeType="text/plain"/> <data android:mimeType="text/plain"/>
</intent> </intent>
</queries> </queries>
<!-- 写权限 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- 读权限 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
</manifest> </manifest>

View File

@ -21,14 +21,16 @@ class WallPaperApp extends StatefulWidget {
class _WallPaperAppState extends State<WallPaperApp> { class _WallPaperAppState extends State<WallPaperApp> {
@override @override
Widget build(BuildContext context){ Widget build(BuildContext context){
return MaterialApp( // return MaterialApp(
title: 'wall paper', // title: 'wall paper',
theme: ThemeData( // debugShowCheckedModeBanner: false,
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepOrange), // theme: ThemeData(
useMaterial3: true, // colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepOrange),
), // useMaterial3: true,
home: const RootWidget(title:'root widget title'), // ),
); // home: const RootWidget(title:'root widget title'),
// );
return const RootWidget(title:'root widget title');
} }
} }
@ -49,6 +51,7 @@ class _RootWidgetState extends State<RootWidget> {
builder: (context,widget){ builder: (context,widget){
return GetMaterialApp( return GetMaterialApp(
title:'Getmaterial app title', title:'Getmaterial app title',
debugShowCheckedModeBanner: false,
theme: ThemeData.light(useMaterial3: true).copyWith( theme: ThemeData.light(useMaterial3: true).copyWith(
primaryColor: Colors.blue, primaryColor: Colors.blue,
), ),

View File

@ -23,6 +23,7 @@ class HomePageView extends GetView <HomePageController> {
// ); // );
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
centerTitle: true,
title: const Text(title), title: const Text(title),
), ),

View File

@ -16,12 +16,18 @@ class ImgScanPageView extends GetView<ImgScanPageController> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
extendBodyBehindAppBar: true,
backgroundColor: Colors.black, backgroundColor: Colors.black,
appBar: AppBar( appBar: PreferredSize(
preferredSize: const Size.fromHeight(44),
child: AppBar(
centerTitle: true,
title: const Text("查看大图"), title: const Text("查看大图"),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
foregroundColor: Colors.white, foregroundColor: Colors.white,
), ),
),
body: Stack( body: Stack(
children: [ children: [
PhotoViewGallery.builder( PhotoViewGallery.builder(

View File

@ -380,10 +380,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: image_gallery_saver name: image_gallery_saver
sha256: be812580c7a320d3bf583af89cac6b376f170d48000aca75215a73285a3223a0 sha256: "0aba74216a4d9b0561510cb968015d56b701ba1bd94aace26aacdd8ae5761816"
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.7.1" version: "2.0.3"
io: io:
dependency: transitive dependency: transitive
description: description:

View File

@ -56,7 +56,7 @@ dependencies:
crypto: ^3.0.3 crypto: ^3.0.3
#将图片导出到相册 #将图片导出到相册
image_gallery_saver: ^1.7.1 image_gallery_saver: ^2.0.3
permission_handler: ^10.0.0 permission_handler: ^10.0.0
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.