4
.github/workflows/gh-pages.yml
vendored
4
.github/workflows/gh-pages.yml
vendored
@@ -94,7 +94,7 @@ jobs:
|
|||||||
# files: build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
|
# files: build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
|
||||||
|
|
||||||
- name: Upload production-ready build files
|
- name: Upload production-ready build files
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v4.4.3
|
||||||
with:
|
with:
|
||||||
name: production-files
|
name: production-files
|
||||||
path: ./build/web
|
path: ./build/web
|
||||||
@@ -107,7 +107,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifact
|
- name: Download artifact
|
||||||
uses: actions/download-artifact@v2.1.1
|
uses: actions/download-artifact@v4.1.8
|
||||||
with:
|
with:
|
||||||
name: production-files
|
name: production-files
|
||||||
path: ./build
|
path: ./build
|
||||||
|
|||||||
@@ -22,3 +22,20 @@ const String dataLink =
|
|||||||
"https://raw.githubusercontent.com/kphanipavan/IIITB_Menu/menu_scraper/out.json";
|
"https://raw.githubusercontent.com/kphanipavan/IIITB_Menu/menu_scraper/out.json";
|
||||||
|
|
||||||
enum DataStatus { Loaded, Loading, NotFound }
|
enum DataStatus { Loaded, Loading, NotFound }
|
||||||
|
|
||||||
|
Widget newNoMenuWidget = Center(
|
||||||
|
child: Column(children: [
|
||||||
|
const Text("Menu not available for this session",
|
||||||
|
style: TextStyle(fontSize: 20, fontStyle: FontStyle.italic)),
|
||||||
|
RichText(
|
||||||
|
text: const TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Click "),
|
||||||
|
WidgetSpan(child: Icon(Icons.update_rounded)),
|
||||||
|
TextSpan(text: " to check for updates.")
|
||||||
|
],
|
||||||
|
style: TextStyle(fontSize: 20, fontStyle: FontStyle.italic),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
], mainAxisAlignment: MainAxisAlignment.center),
|
||||||
|
);
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ class GlobalModel extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateCall() async {
|
updateCall() async {
|
||||||
|
this.menuAvailable = DataStatus.Loading;
|
||||||
|
notifyListeners();
|
||||||
this.mainData = await GlobalModel.updateLocal();
|
this.mainData = await GlobalModel.updateLocal();
|
||||||
if (this.mainData["dates"].keys.contains(this.date)) {
|
if (this.mainData["dates"].keys.contains(this.date)) {
|
||||||
this.menuAvailable = DataStatus.Loaded;
|
this.menuAvailable = DataStatus.Loaded;
|
||||||
|
|||||||
@@ -148,10 +148,10 @@ class HomePage extends StatelessWidget {
|
|||||||
MenuListView(menuType: "dn"),
|
MenuListView(menuType: "dn"),
|
||||||
]
|
]
|
||||||
: [
|
: [
|
||||||
noMenuWidget,
|
newNoMenuWidget,
|
||||||
noMenuWidget,
|
newNoMenuWidget,
|
||||||
noMenuWidget,
|
newNoMenuWidget,
|
||||||
noMenuWidget,
|
newNoMenuWidget,
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user