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
|
||||
|
||||
- name: Upload production-ready build files
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: production-files
|
||||
path: ./build/web
|
||||
@@ -107,7 +107,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v2.1.1
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
with:
|
||||
name: production-files
|
||||
path: ./build
|
||||
|
||||
@@ -22,3 +22,20 @@ const String dataLink =
|
||||
"https://raw.githubusercontent.com/kphanipavan/IIITB_Menu/menu_scraper/out.json";
|
||||
|
||||
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 {
|
||||
this.menuAvailable = DataStatus.Loading;
|
||||
notifyListeners();
|
||||
this.mainData = await GlobalModel.updateLocal();
|
||||
if (this.mainData["dates"].keys.contains(this.date)) {
|
||||
this.menuAvailable = DataStatus.Loaded;
|
||||
|
||||
@@ -148,10 +148,10 @@ class HomePage extends StatelessWidget {
|
||||
MenuListView(menuType: "dn"),
|
||||
]
|
||||
: [
|
||||
noMenuWidget,
|
||||
noMenuWidget,
|
||||
noMenuWidget,
|
||||
noMenuWidget,
|
||||
newNoMenuWidget,
|
||||
newNoMenuWidget,
|
||||
newNoMenuWidget,
|
||||
newNoMenuWidget,
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user