forked from eatvio/eatvio_app
fix: analyzer
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:eatvio_app/core/app_router.dart';
|
||||
import 'package:eatvio_app/core/const.dart';
|
||||
import 'package:eatvio_app/core/theme/custom_text_style.dart';
|
||||
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||||
@@ -149,11 +150,11 @@ class _MyDietWidgetState extends State<MyDietWidget> {
|
||||
CustomOutlinedButton(
|
||||
onPressed: () async {
|
||||
final box = context.findRenderObject() as RenderBox?;
|
||||
await Share.shareUri(
|
||||
Uri.parse(
|
||||
'$baseUrl/ru/diet/${widget.diet.id}',
|
||||
await SharePlus.instance.share(
|
||||
ShareParams(
|
||||
uri: Uri.parse('$baseUrl/ru/diet/${widget.diet.id}'),
|
||||
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
|
||||
),
|
||||
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
|
||||
);
|
||||
},
|
||||
height: 52,
|
||||
@@ -196,7 +197,7 @@ class _MyDietWidgetState extends State<MyDietWidget> {
|
||||
}
|
||||
} else {
|
||||
await showErrorDialog(context, title: 'Предупреждение', description: 'Вы можете создать новую диету на основе существующей.');
|
||||
GoRouter.of(context).pushNamed(CreateDietScreen.name, extra: widget.diet);
|
||||
AppRouter.navigatorKey.currentContext?.pushNamed(CreateDietScreen.name, extra: widget.diet);
|
||||
}
|
||||
},
|
||||
text: switch (state.selectedStateIndex) {
|
||||
|
||||
Reference in New Issue
Block a user