Return to material 2, cleanup patch

This commit is contained in:
2024-03-12 12:44:18 +05:30
parent e417622210
commit 531699a8bb
3 changed files with 14 additions and 25 deletions

View File

@@ -18,9 +18,10 @@ class MainApp extends StatelessWidget {
lazy: false,
create: (context) => GlobalModel(),
builder: (BuildContext context, child) {
return const MaterialApp(
return MaterialApp(
title: "IIITB Menu",
home: HomePage(),
home: const HomePage(),
theme: ThemeData(useMaterial3: false),
);
},
);

View File

@@ -16,7 +16,7 @@ class GlobalModel extends ChangeNotifier {
DataStatus menuAvailable = DataStatus.Loading;
GlobalModel() {
print("In constructor");
// print("In constructor");
GlobalModel.loadData().then((value) {
mainData = value;
if (this.mainData["dates"].keys.contains(this.date)) {
@@ -58,12 +58,12 @@ class GlobalModel extends ChangeNotifier {
String? rawData;
String rawHash;
rawData = prefs.getString(storageKey);
print(rawData);
// print(rawData);
if (rawData != null) {
print("data found");
// print("data found");
rawHash = md5.convert(utf8.encode(rawData)).toString();
print("Hash of Raw Data:");
print(rawHash);
// print("Hash of Raw Data:");
// print(rawHash);
returnData = jsonDecode(rawData);
} else {
print("Data Not Found");