forked from eatvio/eatvio_app
go router 2
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'dart:convert';
|
||||
@@ -24,9 +25,7 @@ class ChatBloc extends Bloc<ChatEvent, ChatState> {
|
||||
final box = await Hive.openBox('token');
|
||||
final token = box.get('token');
|
||||
if (token == null) {
|
||||
NavigatorService.popAndPushNamed(
|
||||
AppRoutes.authScreen,
|
||||
);
|
||||
// go to auth screen
|
||||
}
|
||||
final String? chatID = state.chatModelObj?.chatID;
|
||||
final response = await http.get(
|
||||
|
||||
Reference in New Issue
Block a user