Compare commits
No commits in common. "0b382d72f47a7f6de81b5b3291d16ce21b639785" and "42c97a5f5d1200a5cc9a8d73681a74c7cabca74a" have entirely different histories.
0b382d72f4
...
42c97a5f5d
10 changed files with 190 additions and 149 deletions
|
|
@ -28,14 +28,6 @@ android {
|
||||||
targetSdk = flutter.targetSdkVersion
|
targetSdk = flutter.targetSdkVersion
|
||||||
versionCode = flutter.versionCode
|
versionCode = flutter.versionCode
|
||||||
versionName = flutter.versionName
|
versionName = flutter.versionName
|
||||||
ndk {
|
|
||||||
abiFilters.addAll(listOf("arm64-v8a", "x86_64"))
|
|
||||||
}
|
|
||||||
sourceSets {
|
|
||||||
getByName("main") {
|
|
||||||
jniLibs.srcDirs("src/main/jniLibs")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ class ApiService {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<GetThreadResponse>> fetchEmailsFromFolderReversed(
|
Future<List<GetThreadResponse>> fetchEmailsFromFolderReversed(
|
||||||
String folder, int pagenitaion) async {
|
String folder, int pagenitaion) async {
|
||||||
try {
|
try {
|
||||||
|
|
@ -83,7 +82,6 @@ class ApiService {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> fetchThreads(
|
Future<void> fetchThreads(
|
||||||
//populates allEmails, which is the List that contains all the emails in a thread
|
//populates allEmails, which is the List that contains all the emails in a thread
|
||||||
int threadId,
|
int threadId,
|
||||||
|
|
@ -216,6 +214,7 @@ class ApiService {
|
||||||
|
|
||||||
// SerializableMessage firstMail = mailsInSerializable[0];
|
// SerializableMessage firstMail = mailsInSerializable[0];
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (SerializableMessage mail in mailsInSerializable) {
|
for (SerializableMessage mail in mailsInSerializable) {
|
||||||
Map<String, String> requestBody = {
|
Map<String, String> requestBody = {
|
||||||
|
|
@ -235,8 +234,7 @@ class ApiService {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
print('error ${response.statusCode} ${response.body}');
|
print('error ${response.statusCode} ${response.body}');
|
||||||
}
|
}}
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print("failed trying to post move_email, with error: $e");
|
print("failed trying to post move_email, with error: $e");
|
||||||
}
|
}
|
||||||
|
|
@ -254,17 +252,6 @@ class ApiService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<String>> fetchContacts() async {
|
|
||||||
try {
|
|
||||||
var url = Uri.http('$ip:$port', 'get_contacts');
|
|
||||||
var response = await http.get(url);
|
|
||||||
return List<String>.from(json.decode(response.body));
|
|
||||||
} catch (e) {
|
|
||||||
print('fetchFolders caught error: $e');
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> createFolder(String folderName) async {
|
Future<void> createFolder(String folderName) async {
|
||||||
var url = Uri.http('$ip:$port', 'create_folder');
|
var url = Uri.http('$ip:$port', 'create_folder');
|
||||||
|
|
||||||
|
|
@ -429,7 +416,6 @@ class ApiService {
|
||||||
try {
|
try {
|
||||||
var url = Uri.http(
|
var url = Uri.http(
|
||||||
'$ip:$port', 'post_seen_thread', {'id': thread_id.toString()});
|
'$ip:$port', 'post_seen_thread', {'id': thread_id.toString()});
|
||||||
print("url: $url");
|
|
||||||
var response = await http.get(url);
|
var response = await http.get(url);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
var result = response.body;
|
var result = response.body;
|
||||||
|
|
@ -444,7 +430,6 @@ class ApiService {
|
||||||
try {
|
try {
|
||||||
var url = Uri.http(
|
var url = Uri.http(
|
||||||
'$ip:$port', 'post_unseen_thread', {'id': thread_id.toString()});
|
'$ip:$port', 'post_unseen_thread', {'id': thread_id.toString()});
|
||||||
print("url: $url");
|
|
||||||
var response = await http.get(url);
|
var response = await http.get(url);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
var result = response.body;
|
var result = response.body;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
// import 'package:http/http.dart' as http;
|
||||||
|
// import 'package:flutter_html/flutter_html.dart';
|
||||||
|
|
||||||
class ContactsPage extends StatefulWidget {
|
class ContactsPage extends StatefulWidget {
|
||||||
const ContactsPage({super.key});
|
const ContactsPage({super.key});
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,6 @@ class _EmailListScreenState extends State<EmailListScreen>
|
||||||
selectedEmails[email].seen = read;
|
selectedEmails[email].seen = read;
|
||||||
ApiService()
|
ApiService()
|
||||||
.markAsSeen(selectedEmails[email].id); //the remote or .json
|
.markAsSeen(selectedEmails[email].id); //the remote or .json
|
||||||
print(selectedEmails[email].id);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//unread
|
//unread
|
||||||
|
|
@ -87,7 +85,7 @@ class _EmailListScreenState extends State<EmailListScreen>
|
||||||
selectedEmails[email].seen = read;
|
selectedEmails[email].seen = read;
|
||||||
ApiService()
|
ApiService()
|
||||||
.markAsUnseen(selectedEmails[email].id); //the remote or .json
|
.markAsUnseen(selectedEmails[email].id); //the remote or .json
|
||||||
print(selectedEmails[email].id);
|
print(selectedEmails[email].subject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ class _EmailViewState extends State<EmailView> {
|
||||||
nameOfDocument: widget.subject,
|
nameOfDocument: widget.subject,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
final hardcodedMarkers = [
|
final hardcodedMarkers = [
|
||||||
{'id': 'marker1', 'x': 50, 'y': 100},
|
{'id': 'marker1', 'x': 50, 'y': 100},
|
||||||
{'id': 'marker2', 'x': 150, 'y': 200},
|
{'id': 'marker2', 'x': 150, 'y': 200},
|
||||||
|
|
@ -74,8 +75,6 @@ class _EmailViewState extends State<EmailView> {
|
||||||
.emailContent; //html of the email/ actually entire thread, gives me little space to play in between
|
.emailContent; //html of the email/ actually entire thread, gives me little space to play in between
|
||||||
// i wonder if the other attributes change? because if so i have to add like some zooms in and out of the emails, as in collapse
|
// i wonder if the other attributes change? because if so i have to add like some zooms in and out of the emails, as in collapse
|
||||||
// _registerViewFactory(currentContent);
|
// _registerViewFactory(currentContent);
|
||||||
print("email content in Collapsable ${widget.emailContent}");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _scrollToNumber(String spanId) {
|
void _scrollToNumber(String spanId) {
|
||||||
|
|
@ -100,6 +99,7 @@ class _EmailViewState extends State<EmailView> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
ApiService.currThreadID = widget.id;
|
ApiService.currThreadID = widget.id;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import 'package:crab_ui/sonicEmailView.dart';
|
import 'package:crab_ui/sonicEmailView.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||||
|
|
||||||
import 'folder_drawer.dart';
|
import 'folder_drawer.dart';
|
||||||
|
|
@ -224,22 +223,14 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
leading: Icon(Icons.home),
|
leading: Icon(Icons.home),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// Navigate to Home
|
// Navigate to Home
|
||||||
context.go("/home");
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ListTile(
|
ListTile(
|
||||||
// leading: Icon(Icons.settings),
|
leading: Icon(Icons.settings),
|
||||||
// onTap: () {
|
onTap: () {
|
||||||
// // Navigate to Settings
|
// Navigate to Settings
|
||||||
// },
|
},
|
||||||
// ),
|
),
|
||||||
// ListTile(
|
|
||||||
// leading: Icon(Icons.contact_mail),
|
|
||||||
// onTap: () {
|
|
||||||
// // Navigate to Contacts
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
|
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.email),
|
leading: Icon(Icons.email),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|
@ -543,8 +534,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
"Selected folder: $selectedFolder");
|
"Selected folder: $selectedFolder");
|
||||||
// Store the selected folder or perform any action
|
// Store the selected folder or perform any action
|
||||||
// ApiService.currFolder = selectedFolder!;
|
// ApiService.currFolder = selectedFolder!;
|
||||||
_emailPageKey
|
_emailPageKey.currentState! //the one selected
|
||||||
.currentState! //the one selected
|
|
||||||
.moveSelectedOfFolder(selectedFolder!);
|
.moveSelectedOfFolder(selectedFolder!);
|
||||||
_overlayEntry
|
_overlayEntry
|
||||||
?.remove();
|
?.remove();
|
||||||
|
|
|
||||||
207
lib/login.dart
207
lib/login.dart
|
|
@ -12,21 +12,21 @@ import 'package:flutter/services.dart' show rootBundle;
|
||||||
|
|
||||||
class AuthService extends ChangeNotifier {
|
class AuthService extends ChangeNotifier {
|
||||||
Future<bool> isUserLoggedIn() async {
|
Future<bool> isUserLoggedIn() async {
|
||||||
// ApiService.ip = '127.0.0.1';
|
ApiService.ip = '192.168.2.38';
|
||||||
// ApiService.port = '3001';
|
ApiService.port = '3001';
|
||||||
// print("setted up");
|
print("setted up");
|
||||||
|
|
||||||
// return true;
|
return true;
|
||||||
try {
|
try {
|
||||||
final response =
|
final response =
|
||||||
await http.get(Uri.http('127.0.0.1:6767', 'login_check'));
|
await http.get(Uri.http('localhost:6823', 'read-config'));
|
||||||
|
// await http.get(Uri.parse('http://localhost:6823/read-config'));
|
||||||
|
|
||||||
print(response.statusCode);
|
print(response.statusCode);
|
||||||
print(response.body);
|
print(response.body);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
final data = jsonDecode(response.body);
|
final data = jsonDecode(response.body);
|
||||||
// print(data['state']);
|
// return data['config'];
|
||||||
// return true;
|
|
||||||
try {
|
try {
|
||||||
var url = Uri.http('${data['ip']}:${data['port']}', 'is_logged_in');
|
var url = Uri.http('${data['ip']}:${data['port']}', 'is_logged_in');
|
||||||
var response = await http.get(url);
|
var response = await http.get(url);
|
||||||
|
|
@ -106,25 +106,18 @@ class _SplashScreenState extends State<SplashScreen> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _checkLoginStatus() async {
|
Future<void> _checkLoginStatus() async {
|
||||||
try {
|
// SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
final response =
|
// print(prefs);
|
||||||
await http.get(Uri.parse('http://127.0.0.1:6767/login_check'));
|
// bool isLoggedIn = prefs.getBool('isLoggedIn') ?? false;
|
||||||
print(response.statusCode);
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
print(response.body);
|
bool isLoggedIn = await _authService.isUserLoggedIn();
|
||||||
if (response.statusCode == 200) {
|
print("is logged in $isLoggedIn");
|
||||||
final data = jsonDecode(response.body);
|
if (isLoggedIn) {
|
||||||
print(data['state']);
|
|
||||||
if (data['state']) {
|
|
||||||
context.go("/home");
|
context.go("/home");
|
||||||
|
// Navigator.pushReplacementNamed(context, '/home');
|
||||||
} else {
|
} else {
|
||||||
context.go("/login");
|
context.go("/login");
|
||||||
}
|
// Navigator.pushReplacementNamed(context, '/login');
|
||||||
} else {
|
|
||||||
context.go("/login");
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
print("caught in checkloginstatus in login $e");
|
|
||||||
context.go("/login");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -146,10 +139,14 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
final TextEditingController _emailController = TextEditingController();
|
final TextEditingController _emailController = TextEditingController();
|
||||||
final TextEditingController _passwordController = TextEditingController();
|
final TextEditingController _passwordController = TextEditingController();
|
||||||
|
|
||||||
|
// final ConfigManager _configManager =
|
||||||
|
// ConfigManager("${Directory.current.parent}../crabmail2.conf");
|
||||||
|
// Key to identify the form
|
||||||
final _formKey = GlobalKey<FormState>();
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
|
||||||
Future<bool> setIp(String ip) async {
|
Future<bool> setIp(String ip) async {
|
||||||
//this is not done :sob: :skull:
|
//this is not done :sob: :skull:
|
||||||
|
// _configManager.setField("api_addr", ip);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -158,16 +155,31 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> login() async {
|
Future<void> login() async {
|
||||||
var result = await _handleLogin();
|
bool result = await _handleLogin();
|
||||||
if (result[0]) {
|
if (result) {
|
||||||
ApiService.ip = result[1];
|
Navigator.pushReplacementNamed(context, '/home');
|
||||||
ApiService.port = result[2];
|
|
||||||
context.go('/home');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Future<bool> _checkConfiguration() async {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// void checkLogin() async {
|
||||||
|
// try {
|
||||||
|
// var url = Uri.http('127.0.0.1:3001', 'is_logged_in');
|
||||||
|
// var response = await http.get(url);
|
||||||
|
// print(response.body);
|
||||||
|
// if (response.statusCode == 200) {
|
||||||
|
// print('all good on the west');
|
||||||
|
// }
|
||||||
|
// } catch (e) {
|
||||||
|
// print(e);
|
||||||
|
// }
|
||||||
|
// // bool isLoggedIn = await _authService.isUserLoggedIn();
|
||||||
|
// }
|
||||||
|
|
||||||
// Function to handle login action
|
// Function to handle login action
|
||||||
Future<List> _handleLogin() async {
|
Future<bool> _handleLogin() async {
|
||||||
if (_formKey.currentState!.validate()) {
|
if (_formKey.currentState!.validate()) {
|
||||||
// Perform login action (e.g., authenticate with backend)
|
// Perform login action (e.g., authenticate with backend)
|
||||||
String ip = _ipController.text;
|
String ip = _ipController.text;
|
||||||
|
|
@ -181,64 +193,96 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
print(ip);
|
print(ip);
|
||||||
print(port);
|
print(port);
|
||||||
|
|
||||||
|
String baseUrl = "http://$ip:$port";
|
||||||
|
print("baseurl " + baseUrl);
|
||||||
|
print(baseUrl);
|
||||||
try {
|
try {
|
||||||
Map<String, String> requestBody = {
|
final response =
|
||||||
"user": email,
|
await http.get(Uri.parse('http://localhost:6823/read-config'));
|
||||||
"password": password,
|
|
||||||
"ip": ip,
|
|
||||||
"port": port,
|
|
||||||
};
|
|
||||||
var url = Uri.http("$ip:6767", "login");
|
|
||||||
|
|
||||||
final response = await http.post(url,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
body: jsonEncode(
|
|
||||||
requestBody)); //keep the port but change the ip to the server that will process it?
|
|
||||||
print(response.statusCode);
|
print(response.statusCode);
|
||||||
print(response.body);
|
print(response.body);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
final data = jsonDecode(response.body);
|
final data = jsonDecode(response.body);
|
||||||
if (data["state"] == true) {
|
// return data['config'];
|
||||||
try {
|
|
||||||
final response = await http
|
|
||||||
.get(Uri.parse('http://127.0.0.1:6767/login_check'));
|
|
||||||
print(response.statusCode);
|
|
||||||
print(response.body);
|
|
||||||
if (response.statusCode == 200) {
|
|
||||||
final data = jsonDecode(response.body);
|
|
||||||
print(data['state']);
|
|
||||||
if (data['state']) {
|
|
||||||
context.go("/home");
|
|
||||||
} else {
|
|
||||||
context.go("/login");
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
context.go("/login");
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
print("caught in checkloginstatus in login $e");
|
|
||||||
context.go("/login");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [true, ip, port];
|
|
||||||
}
|
|
||||||
return [false];
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print("caught in catch");
|
print("caught in catch");
|
||||||
print(e);
|
print(e);
|
||||||
return [false];
|
return false;
|
||||||
|
}
|
||||||
|
Map<String, dynamic> updates = {
|
||||||
|
// "username": email,
|
||||||
|
// "password": password,
|
||||||
|
"ip": ip,
|
||||||
|
"port": port,
|
||||||
|
};
|
||||||
|
print("past");
|
||||||
|
|
||||||
|
try {
|
||||||
|
final sending = await http.post(
|
||||||
|
Uri.parse('http://localhost:6823/update-config'),
|
||||||
|
headers: {'Content-Type': "application/json"},
|
||||||
|
body: jsonEncode(updates));
|
||||||
|
print("sending");
|
||||||
|
} catch (e) {
|
||||||
|
print(e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
// String status = await http.post(Uri.parse(''))
|
||||||
|
var url_log = Uri.http('$ip:$port', 'log_in');
|
||||||
|
Map<String, dynamic> filteredData = {
|
||||||
|
"email": email,
|
||||||
|
"password": password,
|
||||||
|
// 'email': updates['username'],
|
||||||
|
// 'password': updates['password']
|
||||||
|
};
|
||||||
|
print(filteredData);
|
||||||
|
var status = await http.post(
|
||||||
|
url_log,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
body: jsonEncode(filteredData),
|
||||||
|
);
|
||||||
|
if (status.statusCode == 200) {
|
||||||
|
print('response status ${status.body}');
|
||||||
|
if (status.body == "Successful log in") {
|
||||||
|
ApiService.ip = ip;
|
||||||
|
ApiService.port = port;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return [false];
|
} catch (e) {
|
||||||
|
print(e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
print("after");
|
||||||
|
return false;
|
||||||
|
// final content = await _authService.readConfFile();
|
||||||
|
// final config = await _authService.parseConfFile(content);
|
||||||
|
// print("BASE URL ${config["base_url"]}");
|
||||||
|
// print("api address ${config["api_addr"]}");
|
||||||
|
// print(config);
|
||||||
|
// const url = ''
|
||||||
|
// Clear the input fields
|
||||||
|
// _ipController.clear();
|
||||||
|
// _portController.clear();
|
||||||
|
// _emailController.clear();
|
||||||
|
// _passwordController.clear();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
_ipController.text = "127.0.0.1";
|
// try {
|
||||||
_portController.text = "3001";
|
// _configManager.loadConfig();
|
||||||
|
// print(_configManager.getField('base_url'));
|
||||||
|
// } catch (e) {
|
||||||
|
// print("broke at build $e");
|
||||||
|
// }
|
||||||
|
// _configManager.
|
||||||
return Center(
|
return Center(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
|
@ -273,6 +317,14 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
return 'Please enter your ip';
|
return 'Please enter your ip';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// onSaved: (value) async {
|
||||||
|
// final content = await _authService.readConfFile();
|
||||||
|
// final config =
|
||||||
|
// await _authService.parseConfFile(content);
|
||||||
|
// print("BASE URL ${config["base_url"]}");
|
||||||
|
// print("api address ${config["api_addr"]}");
|
||||||
|
// //TODO: call a function to set the field ip in conf
|
||||||
|
// },
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
|
|
@ -351,6 +403,17 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
child: const Text('Login'),
|
child: const Text('Login'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// SizedBox(
|
||||||
|
// width: 200,
|
||||||
|
// child: ElevatedButton(
|
||||||
|
// // onPressed: checkLogin,
|
||||||
|
// onPressed: () async {
|
||||||
|
// await _authService.isUserLoggedIn();
|
||||||
|
// // print(result);
|
||||||
|
// },
|
||||||
|
// child: const Text('checker'),
|
||||||
|
// ),
|
||||||
|
// )
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ class HyM extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final GoRouter _router = GoRouter(
|
final GoRouter _router = GoRouter(
|
||||||
|
// refreshListenable: ,
|
||||||
initialLocation: '/',
|
initialLocation: '/',
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
|
|
@ -47,8 +48,7 @@ class HyM extends StatelessWidget {
|
||||||
final target = state.pathParameters['target']!;
|
final target = state.pathParameters['target']!;
|
||||||
final viewspecs = state.pathParameters['viewspecs']!;
|
final viewspecs = state.pathParameters['viewspecs']!;
|
||||||
final emailId = state.pathParameters['emailID']!;
|
final emailId = state.pathParameters['emailID']!;
|
||||||
return Routinghandler.fromParameters(
|
return Routinghandler.fromParameters("main anchor", subject, target, viewspecs, emailId);
|
||||||
"main anchor", subject, target, viewspecs, emailId);
|
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
return MaterialApp.router(
|
return MaterialApp.router(
|
||||||
|
|
@ -59,6 +59,18 @@ class HyM extends StatelessWidget {
|
||||||
),
|
),
|
||||||
title: 'HyM',
|
title: 'HyM',
|
||||||
routerConfig: _router,
|
routerConfig: _router,
|
||||||
|
// home: HomeScreen(),
|
||||||
|
|
||||||
|
// routes: {
|
||||||
|
// "/": (context) => SplashScreen(),
|
||||||
|
// "/login": (context) => const LoginPage(),
|
||||||
|
// "/home": (context) => HomeScreen(),
|
||||||
|
// "/contacts": (context) => ContactsPage(),
|
||||||
|
// GoRoute(
|
||||||
|
// path:
|
||||||
|
// )
|
||||||
|
// "/email": (context) => EmailListScreen(),
|
||||||
|
// },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ class SerializableMessage {
|
||||||
required this.subject,
|
required this.subject,
|
||||||
required this.date,
|
required this.date,
|
||||||
required this.uid,
|
required this.uid,
|
||||||
required this.list, //folder
|
required this.list, //email list???
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.in_reply_to,
|
required this.in_reply_to,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ dependencies:
|
||||||
super_editor: ^0.3.0-dev.27
|
super_editor: ^0.3.0-dev.27
|
||||||
super_editor_markdown: 0.1.8
|
super_editor_markdown: 0.1.8
|
||||||
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue