12 Commits
latest ... test

Author SHA1 Message Date
346b05e80c added excel sheet link 2024-11-15 09:58:08 +05:30
975a6dab88 added gh repo link in about 2024-11-14 09:54:16 +05:30
e52db038f4 Added date pretty print 2024-11-14 09:37:23 +05:30
Phani Pavan Kambhampati
c0ca9542c3 Merge pull request #2 from kphanipavan/master
Update test to master
2024-11-14 09:19:37 +05:30
69858d3076 add update message 2024-11-04 16:42:36 +05:30
Phani Pavan Kambhampati
991573f03c Update gh-pages.yml 2024-10-25 17:43:55 +05:30
Phani Pavan Kambhampati
298786d5b3 Update download artifact action version 2024-10-25 17:32:45 +05:30
Phani Pavan Kambhampati
66a1b1c315 Merge pull request #1 from kphanipavan/test
Lots of updates
2024-10-25 17:26:30 +05:30
Phani Pavan Kambhampati
3db2f94373 temp disable apk build 2024-10-25 17:16:02 +05:30
fdff2bcfee update about page, add share button but not working 2024-10-25 16:37:20 +05:30
ca13f575a2 add new data loading algo 2024-10-25 15:20:36 +05:30
9125041f18 add about page 2024-10-20 12:12:32 +05:30
16 changed files with 352 additions and 86 deletions

View File

@@ -73,8 +73,8 @@ jobs:
- name: Build Web Release - name: Build Web Release
run: flutter build web --base-href "/$HREFREPLACE/" --web-renderer canvaskit --no-web-resources-cdn run: flutter build web --base-href "/$HREFREPLACE/" --web-renderer canvaskit --no-web-resources-cdn
- name: Build Android Release # - name: Build Android Release
run: flutter build apk --split-per-abi --release --no-track-widget-creation --analyze-size --target-platform "android-arm64" # run: flutter build apk --split-per-abi --release --no-track-widget-creation --analyze-size --target-platform "android-arm64"
- name: Fix PWA Offline Support - name: Fix PWA Offline Support
run: | run: |
@@ -83,18 +83,18 @@ jobs:
./fixOfflinePWA.sh ./fixOfflinePWA.sh
cat ./build/web/flutter_service_worker.js cat ./build/web/flutter_service_worker.js
- name: Create Release # - name: Create Release
uses: marvinpinto/action-automatic-releases@v1.2.1 # uses: marvinpinto/action-automatic-releases@v1.2.1
with: # with:
repo_token: "${{ secrets.GITHUB_TOKEN }}" # repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest" # automatic_release_tag: "latest"
prerelease: true # prerelease: true
draft: false # draft: false
title: "Git Build" # title: "Git Build"
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

BIN
assets/excel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/gh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -22,3 +22,24 @@ 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(mainAxisAlignment: MainAxisAlignment.center, 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),
),
),
]),
);
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");

View File

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:iiitb_menu/models/globalModel.dart'; import 'package:iiitb_menu/models/globalModel.dart';
import 'package:iiitb_menu/views/homePage.dart'; import 'package:iiitb_menu/views/homePage.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import "package:iiitb_menu/views/about.dart";
void main() { void main() {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
@@ -20,8 +21,13 @@ class MainApp extends StatelessWidget {
builder: (BuildContext context, child) { builder: (BuildContext context, child) {
return MaterialApp( return MaterialApp(
title: "IIITB Menu", title: "IIITB Menu",
home: const HomePage(), routes: {
theme: ThemeData(useMaterial3: false), "/": (context) => HomePage(),
"/info": (context) => AboutPage(),
},
initialRoute: "/",
// home: const HomePage(),
theme: ThemeData(useMaterial3: true),
); );
}, },
); );

View File

@@ -17,15 +17,29 @@ class GlobalModel extends ChangeNotifier {
GlobalModel() { GlobalModel() {
// print("In constructor"); // print("In constructor");
GlobalModel.loadData().then((value) { GlobalModel.loadData2().then((value) {
mainData = value; mainData = value;
if (this.mainData["dates"].keys.contains(this.date)) { if (this.mainData["dates"].keys.contains(this.date)) {
this.menuAvailable = DataStatus.Loaded; this.menuAvailable = DataStatus.Loaded;
} else {
this.menuAvailable = DataStatus.NotFound;
} }
notifyListeners(); notifyListeners();
}); });
} }
updateCall() async {
this.menuAvailable = DataStatus.Loading;
notifyListeners();
this.mainData = await GlobalModel.updateLocal();
if (this.mainData["dates"].keys.contains(this.date)) {
this.menuAvailable = DataStatus.Loaded;
} else {
this.menuAvailable = DataStatus.NotFound;
}
notifyListeners();
}
static Future<String> getLatestHash() async { static Future<String> getLatestHash() async {
try { try {
Response hashRequest = await get(Uri.parse(hashLink)); Response hashRequest = await get(Uri.parse(hashLink));
@@ -52,6 +66,57 @@ class GlobalModel extends ChangeNotifier {
} }
} }
static Future<Map> updateLocal() async {
// Set main data and return the data to be used in constructor
String remoteHash = await GlobalModel.getLatestHash();
final SharedPreferences prefs = await SharedPreferences.getInstance();
String? rawData = prefs.getString(storageKey);
rawData ??= "";
String rawHash = md5.convert(utf8.encode(rawData)).toString();
if (remoteHash != rawHash) {
print("Local data is out of date, updating local");
print("Old Hash: $rawHash");
print("New Hash: $remoteHash");
// Donwload new data and save it.
rawData = await getLatestData();
Map returnData = jsonDecode(rawData);
prefs.setString(storageKey, rawData);
return returnData;
} else {
// return the same data
print("Local data is up to date");
return jsonDecode(rawData);
}
}
static Future<Map> loadData2() async {
/* New flow for fetching data:
Get cached data into a var
if theres nothing:
get data
generate hash and store both the data and hash
else:
return the current data
Move the download and get hash part to new method - done
create a new method for updating the current data.
This checks for update and saves new data to sharedprefs if necessary,
*/
late Map returnData;
final SharedPreferences prefs = await SharedPreferences.getInstance();
String? rawData;
rawData = prefs.getString(storageKey);
if (rawData != null) {
print("Some data found");
returnData = jsonDecode(rawData);
return returnData;
} else {
print("Data Not Found");
return GlobalModel.updateLocal();
}
}
static Future<Map> loadData() async { static Future<Map> loadData() async {
late Map returnData; late Map returnData;
final SharedPreferences prefs = await SharedPreferences.getInstance(); final SharedPreferences prefs = await SharedPreferences.getInstance();
@@ -92,6 +157,10 @@ class GlobalModel extends ChangeNotifier {
return DateFormat("dd-MM-yyyy").format(this.currentDate); return DateFormat("dd-MM-yyyy").format(this.currentDate);
} }
String get prettyDate {
return DateFormat("EEE, MMM d").format(this.currentDate);
}
void incrDate() { void incrDate() {
this.currentDate = this.currentDate.add(const Duration(days: 1)); this.currentDate = this.currentDate.add(const Duration(days: 1));
this.isMenuAvailable(); this.isMenuAvailable();

48
lib/views/about.dart Normal file
View File

@@ -0,0 +1,48 @@
import 'package:flutter/material.dart';
import "package:iiitb_menu/constants.dart";
import "package:url_launcher/url_launcher.dart";
import "package:iiitb_menu/widgets/linkButton.dart";
class AboutPage extends StatelessWidget {
const AboutPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("About")),
body: Column(
children: [
const Flexible(
child: Padding(
padding: EdgeInsets.only(left: 100, right: 100, top: 50),
child: Image(image: AssetImage("assets/plate.png")),
),
),
const Center(
child: Text(
"IIIT Bangalore's Unofficial Menu App",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 50,
),
),
),
const Center(
child: Text("Proud Ass Web 1.0 App built with Flutter"),
),
const Center(
child: Text(
"Menu updates every other Tuesday or when FoodComm does it."),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
LinkButton(iconImage: "assets/gh.png", link: ghURI),
LinkButton(iconImage: "assets/excel.png", link: excelSheetURI),
],
),
],
),
);
}
}

View File

@@ -6,6 +6,7 @@ import "package:iiitb_menu/models/globalModel.dart";
import "package:iiitb_menu/models/initialPageIndexFunction.dart"; import "package:iiitb_menu/models/initialPageIndexFunction.dart";
import "package:iiitb_menu/views/menuListView.dart"; import "package:iiitb_menu/views/menuListView.dart";
import "package:provider/provider.dart"; import "package:provider/provider.dart";
import "package:share_plus/share_plus.dart";
class HomePage extends StatelessWidget { class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key); const HomePage({Key? key}) : super(key: key);
@@ -25,13 +26,52 @@ class HomePage extends StatelessWidget {
return Consumer<GlobalModel>( return Consumer<GlobalModel>(
builder: (BuildContext context, GlobalModel data, Widget? child) { builder: (BuildContext context, GlobalModel data, Widget? child) {
return Scaffold( return Scaffold(
drawer: Drawer(
child: ListView(
children: [
ListTile(
leading: const Icon(Icons.arrow_back),
title: const 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: 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"),
onTap: () {
Navigator.pushNamed(context, "/info");
}),
],
),
),
appBar: AppBar( appBar: AppBar(
title: Text("Daily ${data.menuTime} Menu"), title: Text(data.menuTime),
bottom: TabBar( bottom: TabBar(
controller: cont, controller: cont,
splashFactory: NoSplash.splashFactory, splashFactory: NoSplash.splashFactory,
indicator: const UnderlineTabIndicator( // indicator: const UnderlineTabIndicator(
insets: EdgeInsets.fromLTRB(10, 3, 10, 3)), // insets: EdgeInsets.fromLTRB(10, 3, 10, 3)),
onTap: (int index) { onTap: (int index) {
data.setMenuTime(index); data.setMenuTime(index);
}, },
@@ -42,6 +82,20 @@ class HomePage extends StatelessWidget {
Tab(icon: Icon(Icons.dinner_dining_outlined)) Tab(icon: Icon(Icons.dinner_dining_outlined))
]), ]),
actions: [ actions: [
InkWell(
splashFactory: NoSplash.splashFactory,
onTap: () {
data.updateCall();
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Center(
child: Icon(data.menuAvailable == DataStatus.Loading
? Icons.downloading_rounded
: Icons.update_rounded),
),
),
),
InkWell( InkWell(
splashFactory: NoSplash.splashFactory, splashFactory: NoSplash.splashFactory,
onTap: () { onTap: () {
@@ -49,10 +103,12 @@ class HomePage extends StatelessWidget {
}, },
child: const Padding( child: const Padding(
padding: EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10),
child: Center(
child: Icon( child: Icon(
Icons.keyboard_arrow_left_rounded, Icons.keyboard_arrow_left_rounded,
size: 30, size: 30,
), ),
),
)), )),
InkWell( InkWell(
splashFactory: NoSplash.splashFactory, splashFactory: NoSplash.splashFactory,
@@ -72,7 +128,7 @@ class HomePage extends StatelessWidget {
data.setDateToADay(); data.setDateToADay();
}, },
child: Center( child: Center(
child: Text(data.date), child: Text(data.prettyDate),
), ),
), ),
InkWell( InkWell(
@@ -82,10 +138,12 @@ class HomePage extends StatelessWidget {
}, },
child: const Padding( child: const Padding(
padding: EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10),
child: Center(
child: Icon( child: Icon(
Icons.keyboard_arrow_right_rounded, Icons.keyboard_arrow_right_rounded,
size: 30, size: 30,
), ),
),
)), )),
], ],
), ),
@@ -99,10 +157,10 @@ class HomePage extends StatelessWidget {
MenuListView(menuType: "dn"), MenuListView(menuType: "dn"),
] ]
: [ : [
noMenuWidget, newNoMenuWidget,
noMenuWidget, newNoMenuWidget,
noMenuWidget, newNoMenuWidget,
noMenuWidget, newNoMenuWidget,
]), ]),
); );
}); });

View 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);
}
}),
);
}
}

View File

@@ -6,6 +6,10 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) { void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
} }

View File

@@ -3,6 +3,7 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_linux
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST list(APPEND FLUTTER_FFI_PLUGIN_LIST

View File

@@ -6,9 +6,13 @@ import FlutterMacOS
import Foundation import Foundation
import path_provider_foundation import path_provider_foundation
import share_plus
import shared_preferences_foundation import shared_preferences_foundation
import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
} }

View File

@@ -2,7 +2,7 @@ name: iiitb_menu
description: IIITB Bi-Weekly Menu description: IIITB Bi-Weekly Menu
# The following line prevents the package from being accidentally published to # The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages. # pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: "none" # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application. # The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43 # A version number is three numbers separated by dots, like 1.2.43
@@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1 version: 1.0.0+1
environment: environment:
sdk: '>=3.1.0 <4.0.0' sdk: ">=3.1.0 <4.0.0"
# Dependencies specify other packages that your package needs in order to work. # Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions # To automatically upgrade your package dependencies to the latest versions
@@ -31,10 +31,9 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2 # cupertino_icons: ^1.0.2
provider: ^6.0.5 provider: ^6.0.5
crypto: ^3.0.3 crypto: ^3.0.3
intl: ^0.18.1 intl: ^0.18.1
@@ -43,6 +42,8 @@ dependencies:
path_provider: path_provider:
# localstorage: ^4.0.1+4 # localstorage: ^4.0.1+4
shared_preferences: ^2.2.0 shared_preferences: ^2.2.0
share_plus: ^10.1.1
url_launcher: ^6.3.1
# sembast: # sembast:
dev_dependencies: dev_dependencies:
@@ -61,7 +62,6 @@ dev_dependencies:
# The following section is specific to Flutter packages. # The following section is specific to Flutter packages.
flutter: flutter:
# The following line ensures that the Material Icons font is # The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in # included with your application, so that you can use the icons in
# the material Icons class. # the material Icons class.
@@ -70,6 +70,8 @@ flutter:
# To add assets to your application, add an assets section, like this: # To add assets to your application, add an assets section, like this:
assets: assets:
- assets/plate.png - assets/plate.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

View File

@@ -1,6 +1,5 @@
<!DOCTYPE html> <!doctype html>
<html> <html>
<head> <head>
<!-- <!--
If you are serving your web app in a path other than the root, change the If you are serving your web app in a path other than the root, change the
@@ -15,26 +14,49 @@
This is a placeholder for base href that will be replaced by the value of This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`. the `--base-href` argument provided to `flutter build`.
--> -->
<base href="$FLUTTER_BASE_HREF"> <base href="$FLUTTER_BASE_HREF" />
<meta charset="UTF-8"> <meta charset="UTF-8" />
<meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta content="IE=Edge" http-equiv="X-UA-Compatible" />
<meta name="description" content="Bi-Weekly Menu"> <meta name="description" content="Bi-Weekly Menu" />
<!-- iOS meta tags & icons --> <!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content="IIITB Menu"> <meta name="apple-mobile-web-app-title" content="IIITB Menu" />
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-touch-icon.png"> <link
rel="apple-touch-icon"
sizes="180x180"
href="icons/apple-touch-icon.png"
/>
<!-- Favicon --> <!-- Favicon -->
<link rel="icon" type="image/ico" href="favicon.ico" /> <link rel="icon" type="image/ico" href="favicon.ico" />
<link rel="mask-icon" href="icons/safari-pinned-tab.svg" color="#5bbad5"> <link
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png"> rel="mask-icon"
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png"> href="icons/safari-pinned-tab.svg"
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png"> color="#5bbad5"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="icons/favicon-96x96.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="icons/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="icons/favicon-16x16.png"
/>
<title>iiitb_menu</title> <title>iiitb_menu</title>
<link rel="manifest" href="manifest.json"> <link rel="manifest" href="manifest.json" />
<script> <script>
// The value below is injected by flutter build, do not touch. // The value below is injected by flutter build, do not touch.
@@ -46,23 +68,21 @@
<body> <body>
<script> <script>
window.addEventListener('load', function (ev) window.addEventListener("load", function (ev) {
{
// Download main.dart.js // Download main.dart.js
_flutter.loader.loadEntrypoint({ _flutter.loader.loadEntrypoint({
serviceWorker: { serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion, serviceWorkerVersion: serviceWorkerVersion,
}, },
onEntrypointLoaded: function (engineInitializer) onEntrypointLoaded: function (engineInitializer) {
{ engineInitializer
engineInitializer.initializeEngine().then(function (appRunner) .initializeEngine()
{ .then(function (appRunner) {
appRunner.runApp(); appRunner.runApp();
}); });
} },
}); });
}); });
</script> </script>
</body> </body>
</html> </html>

View File

@@ -6,6 +6,12 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <share_plus/share_plus_windows_plugin_c_api.h>
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
SharePlusWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
} }

View File

@@ -3,6 +3,8 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
share_plus
url_launcher_windows
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST list(APPEND FLUTTER_FFI_PLUGIN_LIST