@@ -66,71 +66,69 @@ Future<void> showImageActionBottomSheet({
6666 context: context,
6767 builder: (context) {
6868 final tr = context.t.imageBottomSheet;
69- return Scaffold (
70- appBar: AppBar (
71- title: Text (tr.title, style: Theme .of (context).textTheme.titleMedium),
72- automaticallyImplyLeading: false ,
73- centerTitle: true ,
74- ),
75- body: Column (
76- children: [
77- Align (
78- child: ColoredBox (
79- color: Theme .of (context).colorScheme.surfaceContainerLow,
80- child: ConstrainedBox (
81- constraints: const BoxConstraints (maxHeight: 100 ),
82- child: Padding (padding: edgeInsetsT4B4, child: NetworkIndicatorImage (imageUrl)),
83- ),
69+
70+ return Column (
71+ children: [
72+ sizedBoxW12H12,
73+ Center (child: Text (tr.title, style: Theme .of (context).textTheme.titleMedium)),
74+ sizedBoxW12H12,
75+ Align (
76+ child: ColoredBox (
77+ color: Theme .of (context).colorScheme.surfaceContainerLow,
78+ child: ConstrainedBox (
79+ constraints: const BoxConstraints (maxHeight: 100 ),
80+ child: Padding (padding: edgeInsetsT4B4, child: NetworkIndicatorImage (imageUrl)),
8481 ),
8582 ),
86- Expanded (
87- child: SingleChildScrollView (
88- child: Column (
89- children: [
90- ListTile (
91- leading: const Icon (Icons .fullscreen_outlined),
92- title: Text (tr.checkDetail),
93- onTap: () async {
94- await context.pushNamed (ScreenPaths .imageDetail, pathParameters: {'imageUrl' : imageUrl});
95- if (context.mounted) {
96- context.pop ();
97- }
98- },
99- ),
83+ ),
84+ sizedBoxW12H12,
85+ Expanded (
86+ child: SingleChildScrollView (
87+ child: Column (
88+ children: [
89+ ListTile (
90+ leading: const Icon (Icons .fullscreen_outlined),
91+ title: Text (tr.checkDetail),
92+ onTap: () async {
93+ await context.pushNamed (ScreenPaths .imageDetail, pathParameters: {'imageUrl' : imageUrl});
94+ if (context.mounted) {
95+ context.pop ();
96+ }
97+ },
98+ ),
99+ ListTile (
100+ leading: const Icon (Icons .copy_outlined),
101+ title: Text (tr.copyImageUrl),
102+ subtitle: Text (imageUrl),
103+ onTap: () async {
104+ await copyToClipboard (context, imageUrl);
105+ if (context.mounted) {
106+ context.pop ();
107+ }
108+ },
109+ ),
110+ ListTile (
111+ leading: const Icon (Icons .refresh_outlined),
112+ title: Text (tr.reloadImage),
113+ onTap: () => context.read <ImageCacheTriggerCubit >().updateImageCache (imageUrl, force: true ),
114+ ),
115+ if (hrefUrl != null )
100116 ListTile (
101- leading: const Icon (Icons .copy_outlined ),
102- title: Text (tr.copyImageUrl ),
103- subtitle: Text (imageUrl ),
117+ leading: const Icon (Icons .link_outlined ),
118+ title: Text (tr.openLink ),
119+ subtitle: Text (hrefUrl ),
104120 onTap: () async {
105- await copyToClipboard ( context, imageUrl );
121+ await context. dispatchAsUrl (hrefUrl );
106122 if (context.mounted) {
107123 context.pop ();
108124 }
109125 },
110126 ),
111- ListTile (
112- leading: const Icon (Icons .refresh_outlined),
113- title: Text (tr.reloadImage),
114- onTap: () => context.read <ImageCacheTriggerCubit >().updateImageCache (imageUrl, force: true ),
115- ),
116- if (hrefUrl != null )
117- ListTile (
118- leading: const Icon (Icons .link_outlined),
119- title: Text (tr.openLink),
120- subtitle: Text (hrefUrl),
121- onTap: () async {
122- await context.dispatchAsUrl (hrefUrl);
123- if (context.mounted) {
124- context.pop ();
125- }
126- },
127- ),
128- ],
129- ),
127+ ],
130128 ),
131129 ),
132- ] ,
133- ) ,
130+ ) ,
131+ ] ,
134132 );
135133 },
136134 );
0 commit comments