update about page, add share button but not working
This commit is contained in:
@@ -6,6 +6,7 @@ import "package:iiitb_menu/models/globalModel.dart";
|
||||
import "package:iiitb_menu/models/initialPageIndexFunction.dart";
|
||||
import "package:iiitb_menu/views/menuListView.dart";
|
||||
import "package:provider/provider.dart";
|
||||
import "package:share_plus/share_plus.dart";
|
||||
|
||||
class HomePage extends StatelessWidget {
|
||||
const HomePage({Key? key}) : super(key: key);
|
||||
@@ -29,23 +30,35 @@ class HomePage extends StatelessWidget {
|
||||
child: ListView(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: Icon(Icons.menu),
|
||||
leading: Icon(Icons.arrow_back),
|
||||
title: Text("Menu"),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
// ListTile(
|
||||
// leading: Icon(Icons.star),
|
||||
// title: Text("Specials"),
|
||||
// ),
|
||||
const Divider(),
|
||||
// ListTile(
|
||||
// leading: Icon(Icons.settings),
|
||||
// title: Text("Settings"),
|
||||
// ),
|
||||
ListTile(
|
||||
leading: Icon(Icons.star),
|
||||
title: Text("Specials"),
|
||||
),
|
||||
Divider(),
|
||||
ListTile(
|
||||
leading: Icon(Icons.settings),
|
||||
title: Text("Settings"),
|
||||
),
|
||||
leading: const Icon(Icons.share_rounded),
|
||||
title: const Text("Share"),
|
||||
onTap: () {
|
||||
var ret = Share.share(
|
||||
"Hey, use this to track IIITB's Mess Menu. https://kphanipavan.github.io/IIITB_Menu/",
|
||||
// subject: "IIITB Menu App",
|
||||
);
|
||||
ret.then((value) {
|
||||
print(value.status);
|
||||
});
|
||||
}),
|
||||
ListTile(
|
||||
leading: Icon(Icons.info),
|
||||
title: Text("About App"),
|
||||
title: Text("About"),
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, "/info");
|
||||
}),
|
||||
@@ -53,7 +66,7 @@ class HomePage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
appBar: AppBar(
|
||||
title: Text("Daily ${data.menuTime} Menu"),
|
||||
title: Text(data.menuTime),
|
||||
bottom: TabBar(
|
||||
controller: cont,
|
||||
// splashFactory: InkSplash.splashFactory,
|
||||
@@ -74,7 +87,9 @@ class HomePage extends StatelessWidget {
|
||||
onTap: () {
|
||||
data.updateCall();
|
||||
},
|
||||
child: const Icon(Icons.refresh),
|
||||
child: Icon(data.menuAvailable == DataStatus.Loading
|
||||
? Icons.downloading_rounded
|
||||
: Icons.update_rounded),
|
||||
),
|
||||
InkWell(
|
||||
splashFactory: NoSplash.splashFactory,
|
||||
|
||||
Reference in New Issue
Block a user