@@ -70,7 +70,7 @@ class _DetailRouteState extends State<DetailRoute> {
7070
7171 await Navigator .of (context).pushAndRemoveUntil (
7272 MaterialPageRoute (builder: (context) => const HomePage ()),
73- (Route <dynamic > route) => false );
73+ (Route <dynamic > route) => false );
7474 }
7575 // ignore: use_build_context_synchronously
7676 return showDialog (
@@ -84,7 +84,9 @@ class _DetailRouteState extends State<DetailRoute> {
8484 saveChanges ();
8585 Navigator .of (context).pushNamedAndRemoveUntil (
8686 HomePage .routeName,
87- (route) => false ,
87+
88+ (route) => false ,
89+
8890 );
8991 setState (() {});
9092 },
@@ -94,7 +96,7 @@ class _DetailRouteState extends State<DetailRoute> {
9496 onPressed: () {
9597 Navigator .of (context).pushNamedAndRemoveUntil (
9698 HomePage .routeName,
97- (route) => false ,
99+ (route) => false ,
98100 );
99101 },
100102 child: const Text ('No' ),
@@ -156,46 +158,46 @@ class _DetailRouteState extends State<DetailRoute> {
156158 floatingActionButton: (modify.changes.isEmpty)
157159 ? null
158160 : FloatingActionButton (
159- heroTag: "btn1" ,
160- onPressed: () {
161- showDialog (
162- context: context,
163- builder: (context) {
164- return AlertDialog (
165- scrollable: true ,
166- title: const Text ('Review changes:' ),
167- content: SingleChildScrollView (
168- scrollDirection: Axis .horizontal,
169- child: Text (
170- modify.changes.entries
171- .map ((entry) => '${entry .key }:\n '
172- ' old: ${entry .value ['old' ]}\n '
173- ' new: ${entry .value ['new' ]}' )
174- .toList ()
175- .join ('\n ' ),
176- style: GoogleFonts .poppins (),
177- ),
178- ),
179- actions: [
180- TextButton (
181- onPressed: () {
182- Navigator .of (context).pop ();
183- },
184- child: const Text ('Cancel' ),
185- ),
186- ElevatedButton (
187- onPressed: () {
188- saveChanges ();
189- },
190- child: const Text ('Submit' ),
191- ),
192- ],
193- );
194- },
195- );
196- },
197- child: const Icon (Icons .save),
198- ),
161+ heroTag: "btn1" ,
162+ onPressed: () {
163+ showDialog (
164+ context: context,
165+ builder: (context) {
166+ return AlertDialog (
167+ scrollable: true ,
168+ title: const Text ('Review changes:' ),
169+ content: SingleChildScrollView (
170+ scrollDirection: Axis .horizontal,
171+ child: Text (
172+ modify.changes.entries
173+ .map ((entry) => '${entry .key }:\n '
174+ ' old: ${entry .value ['old' ]}\n '
175+ ' new: ${entry .value ['new' ]}' )
176+ .toList ()
177+ .join ('\n ' ),
178+ style: GoogleFonts .poppins (),
179+ ),
180+ ),
181+ actions: [
182+ TextButton (
183+ onPressed: () {
184+ Navigator .of (context).pop ();
185+ },
186+ child: const Text ('Cancel' ),
187+ ),
188+ ElevatedButton (
189+ onPressed: () {
190+ saveChanges ();
191+ },
192+ child: const Text ('Submit' ),
193+ ),
194+ ],
195+ );
196+ },
197+ );
198+ },
199+ child: const Icon (Icons .save),
200+ ),
199201 ),
200202 );
201203 }
@@ -274,12 +276,12 @@ class AttributeWidget extends StatelessWidget {
274276 value: localValue,
275277 callback: callback,
276278 );
277- // case 'annotations':
278- // return AnnotationsWidget(
279- // name: name,
280- // value: localValue,
281- // callback: callback,
282- // );
279+ // case 'annotations':
280+ // return AnnotationsWidget(
281+ // name: name,
282+ // value: localValue,
283+ // callback: callback,
284+ // );
283285 default :
284286 return Card (
285287 color: AppSettings .isDarkMode
@@ -299,15 +301,15 @@ class AttributeWidget extends StatelessWidget {
299301 fontWeight: FontWeight .bold,
300302 fontSize: 15 ,
301303 color:
302- AppSettings .isDarkMode ? Colors .white : Colors .black,
304+ AppSettings .isDarkMode ? Colors .white : Colors .black,
303305 ),
304306 ),
305307 Text (
306308 localValue? .toString () ?? "not selected" ,
307309 style: GoogleFonts .poppins (
308310 fontSize: 15 ,
309311 color:
310- AppSettings .isDarkMode ? Colors .white : Colors .black,
312+ AppSettings .isDarkMode ? Colors .white : Colors .black,
311313 ),
312314 )
313315 ],
@@ -359,7 +361,7 @@ class TagsWidget extends StatelessWidget {
359361 ),
360362 TextSpan (
361363 text:
362- '${(value as ListBuilder ?)?.build () ?? 'not selected' }' ,
364+ '${(value as ListBuilder ?)?.build () ?? 'not selected' }' ,
363365 style: GoogleFonts .poppins (
364366 fontSize: 15 ,
365367 color: AppSettings .isDarkMode
@@ -431,4 +433,4 @@ class TagsWidget extends StatelessWidget {
431433// ),
432434// );
433435// }
434- // }
436+ // }
0 commit comments