redirect to itemmenu
This commit is contained in:
parent
8a3ce376ce
commit
0ae1311b53
@ -37,7 +37,7 @@ mixin ShowDescImageGet<T extends StatefulWidget> on State<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void showDescImageUpdateDialog(BuildContext context, var events) {
|
void showDescImageGetDialog(BuildContext context, var events) {
|
||||||
// Create AlertDialog
|
// Create AlertDialog
|
||||||
String name = events['name'];
|
String name = events['name'];
|
||||||
AlertDialog dialog = AlertDialog(
|
AlertDialog dialog = AlertDialog(
|
||||||
|
@ -6,6 +6,7 @@ import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|||||||
import 'package:flutter_gemini/flutter_gemini.dart';
|
import 'package:flutter_gemini/flutter_gemini.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
|
import "ItemMenu.dart";
|
||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
@ -85,6 +86,11 @@ class DisplayPictureScreenState extends State<DisplayPictureScreen>
|
|||||||
print("reponse http : ${events.length}");
|
print("reponse http : ${events.length}");
|
||||||
if (events.length == 0) {
|
if (events.length == 0) {
|
||||||
showDescImageAddDialog(context, jsonData);
|
showDescImageAddDialog(context, jsonData);
|
||||||
|
} else {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (_) => ItemMenu(title: events[0]["id"])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user