BIN
assets/excel.png
Normal file
BIN
assets/excel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@@ -41,3 +41,5 @@ Widget newNoMenuWidget = Center(
|
|||||||
);
|
);
|
||||||
|
|
||||||
Uri ghURI = Uri.parse("https://github.com/kphanipavan/IIITB_Menu");
|
Uri ghURI = Uri.parse("https://github.com/kphanipavan/IIITB_Menu");
|
||||||
|
Uri excelSheetURI = Uri.parse(
|
||||||
|
"https://iiitbac-my.sharepoint.com/:x:/g/personal/foodcommittee_iiitb_ac_in/ESrcRZMPYFpOgk2VEPd0zd8BDfsMkTUXWM4hRi-2QNF44g?e=fjFkFy");
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import "package:iiitb_menu/constants.dart";
|
import "package:iiitb_menu/constants.dart";
|
||||||
import "package:url_launcher/url_launcher.dart";
|
import "package:url_launcher/url_launcher.dart";
|
||||||
|
import "package:iiitb_menu/widgets/linkButton.dart";
|
||||||
|
|
||||||
class AboutPage extends StatelessWidget {
|
class AboutPage extends StatelessWidget {
|
||||||
const AboutPage({Key? key}) : super(key: key);
|
const AboutPage({Key? key}) : super(key: key);
|
||||||
@@ -33,14 +34,13 @@ class AboutPage extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
"Menu updates every other Tuesday or when FoodComm does it."),
|
"Menu updates every other Tuesday or when FoodComm does it."),
|
||||||
),
|
),
|
||||||
InkWell(
|
Row(
|
||||||
child:
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
const Image(image: AssetImage("assets/gh.png"), height: 20),
|
children: [
|
||||||
onTap: () async {
|
LinkButton(iconImage: "assets/gh.png", link: ghURI),
|
||||||
if (await canLaunchUrl(ghURI)) {
|
LinkButton(iconImage: "assets/excel.png", link: excelSheetURI),
|
||||||
launchUrl(ghURI);
|
],
|
||||||
}
|
),
|
||||||
}),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
25
lib/widgets/linkButton.dart
Normal file
25
lib/widgets/linkButton.dart
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import "package:flutter/material.dart";
|
||||||
|
import "package:url_launcher/url_launcher.dart";
|
||||||
|
|
||||||
|
class LinkButton extends StatelessWidget {
|
||||||
|
final Uri link;
|
||||||
|
final String iconImage;
|
||||||
|
final double height;
|
||||||
|
const LinkButton(
|
||||||
|
{Key? key, required this.link, required this.iconImage, this.height = 30})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: InkWell(
|
||||||
|
child: Image(image: AssetImage(iconImage), height: height),
|
||||||
|
onTap: () async {
|
||||||
|
if (await canLaunchUrl(link)) {
|
||||||
|
launchUrl(link);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -71,6 +71,7 @@ flutter:
|
|||||||
assets:
|
assets:
|
||||||
- assets/plate.png
|
- assets/plate.png
|
||||||
- assets/gh.png
|
- assets/gh.png
|
||||||
|
- assets/excel.png
|
||||||
# - images/a_dot_ham.jpeg
|
# - images/a_dot_ham.jpeg
|
||||||
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
|
|||||||
Reference in New Issue
Block a user