From 9786bcdfceb989fc0c184a96650ab7fa7a2833bf Mon Sep 17 00:00:00 2001 From: "sewmina7@gmail.com" Date: Sun, 24 Sep 2023 22:46:37 +0530 Subject: [PATCH] review bonus --- lib/backend/DataManager.dart | 31 +- lib/home.dart | 537 ++++++++++++------ macos/Flutter/GeneratedPluginRegistrant.swift | 2 + pubspec.lock | 32 ++ pubspec.yaml | 1 + .../flutter/generated_plugin_registrant.cc | 3 + windows/flutter/generated_plugins.cmake | 1 + 7 files changed, 435 insertions(+), 172 deletions(-) diff --git a/lib/backend/DataManager.dart b/lib/backend/DataManager.dart index 5f9ff78..979b37b 100644 --- a/lib/backend/DataManager.dart +++ b/lib/backend/DataManager.dart @@ -7,7 +7,7 @@ import 'DebugHelper.dart'; class DataManager{ static int ClientVersion = 2; - static const String API_ENDPOINT = "http://vps.playpoolstudios.com/faucet/api/"; + static const String API_ENDPOINT = "http://vps.playpoolstudios.com/faucet/api/v2/"; static Map Settings = {}; static List AllGames = []; @@ -104,14 +104,14 @@ class DataManager{ Debug.Log("err044 : $UserJson"); LinkedGamesJson = []; NonLinkedGamesJson = []; - if (UserJson['linkedGames'] + if (UserJson['linked_games'] .toString() .length < 3) { NonLinkedGamesJson = AllGames; return; } List> linkedGames = jsonDecode( - UserJson['linkedGames']).cast>(); + UserJson['linked_games']).cast>(); AllGames.forEach((element) { bool foundLink = false; @@ -325,6 +325,31 @@ class DataManager{ } } + static Future Review() async{ + var loginResponse = null; + try { + loginResponse = (await http.post( + Uri.parse('${DataManager.API_ENDPOINT}review.php'), + body: { + "username": username, + "password": password + })); + Debug.LogResponse(loginResponse.body.toString(),src: "review.php"); + + try{ + DataManager.UserJson = jsonDecode(loginResponse.body.toString()); + await DataManager.GetGamesProgress(); + return 0; + }catch(e){ + return 5; + } + } catch (e) { + Debug.LogError("Error while review $e"); + } + + return 1; + } + static Future> GetWithdrawalHistory() async{ Map body = { diff --git a/lib/home.dart b/lib/home.dart index 183b6df..f7c652f 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -1,6 +1,7 @@ import 'package:animated_text_kit/animated_text_kit.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:connectivity_plus/connectivity_plus.dart'; +import 'package:external_app_launcher/external_app_launcher.dart'; import 'package:fhub/backend/DataManager.dart'; import 'package:fhub/backend/DebugHelper.dart'; import 'package:fhub/backend/Dialogs.dart'; @@ -13,6 +14,7 @@ import 'package:fhub/welcome.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; +import 'package:share_plus/share_plus.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'backend/helpers.dart'; @@ -35,19 +37,22 @@ class _HomeState extends State with WidgetsBindingObserver { WidgetsBinding.instance.addObserver(this); - subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) async{ + subscription = Connectivity() + .onConnectivityChanged + .listen((ConnectivityResult result) async { // Got a new connectivity status! - try{ + try { final connectivityResult = await (Connectivity().checkConnectivity()); Debug.Log(connectivityResult); - if(connectivityResult != ConnectivityResult.mobile && connectivityResult != ConnectivityResult.mobile && connectivityResult != ConnectivityResult.ethernet){ - Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (_)=>OfflinePage(id:0))); + if (connectivityResult != ConnectivityResult.mobile && + connectivityResult != ConnectivityResult.mobile && + connectivityResult != ConnectivityResult.ethernet) { + Navigator.of(context).pushReplacement( + MaterialPageRoute(builder: (_) => OfflinePage(id: 0))); return; } - }catch(e){ - - } + } catch (e) {} }); } @@ -66,20 +71,17 @@ class _HomeState extends State with WidgetsBindingObserver { super.didChangeAppLifecycleState(state); // Debug.Log(state); - if(state == AppLifecycleState.resumed){ + if (state == AppLifecycleState.resumed) { Refresh(); } } - void Refresh()async{ + void Refresh() async { await DataManager.GrabOnce(); - setState(() { - - }); + setState(() {}); } - void kickstartAnimations() async { await Future.delayed(const Duration(milliseconds: 500)); @@ -111,12 +113,12 @@ class _HomeState extends State with WidgetsBindingObserver { }, bottomNav: [ BottomNavBarItem( - icon: Icons.home, - active: selectedPageId == 0, + icon: Icons.people, + active: selectedPageId == 4, onPressed: () { setState(() { - TitleText = "Home"; - selectedPageId = 0; + TitleText = "Share"; + selectedPageId = 4; }); }, ), @@ -129,6 +131,16 @@ class _HomeState extends State with WidgetsBindingObserver { selectedPageId = 3; }); }), + BottomNavBarItem( + icon: Icons.home, + active: selectedPageId == 0, + onPressed: () { + setState(() { + TitleText = "Home"; + selectedPageId = 0; + }); + }, + ), BottomNavBarItem( icon: Icons.wallet, active: selectedPageId == 1, @@ -191,6 +203,8 @@ class _HomeState extends State with WidgetsBindingObserver { return games(); case 2: return settings(); + case 4: + return share(); default: return home(); } @@ -261,7 +275,7 @@ class _HomeState extends State with WidgetsBindingObserver { ), SizedBox(height: 20), GlassButton( - color: Colors.lightBlueAccent, + color: Colors.lightBlueAccent, onTap: () { setState(() { selectedPageId = 3; @@ -310,7 +324,9 @@ class _HomeState extends State with WidgetsBindingObserver { child: Padding( padding: const EdgeInsets.all(15.0), child: Text( - "Install a game from the list below and Link it to FaucetHub(FH) to Start Earning!",style: TextStyle(color: Colors.blue.withGreen(150).withRed(100)), + "Install a game from the list below and Link it to FaucetHub(FH) to Start Earning!", + style: + TextStyle(color: Colors.blue.withGreen(150).withRed(100)), textAlign: TextAlign.center, ), )), @@ -337,15 +353,13 @@ class _HomeState extends State with WidgetsBindingObserver { Widget GameCard({required int index, required List list}) { return GlassCard( child: InkWell( - onTap: () async{ + onTap: () async { await Navigator.of(context).push(MaterialPageRoute( builder: (BuildContext context) => GameInfoPage(gameJson: list[index]))); await DataManager.GrabOnce(); - setState(() { - - }); + setState(() {}); }, child: Container( padding: EdgeInsets.all(12), @@ -363,9 +377,11 @@ class _HomeState extends State with WidgetsBindingObserver { width: 50, child: ClipRRect( borderRadius: BorderRadius.circular(10), - child: CachedNetworkImage(imageUrl: list[index]['icon'],) + child: CachedNetworkImage( + imageUrl: list[index]['icon'], + ) // child: Image.network(list[index]['icon']) - )), + )), Icon(Helpers.GetIconForCrypto(list[index]['coin'])) ], ), @@ -414,138 +430,290 @@ class _HomeState extends State with WidgetsBindingObserver { ), Text('~ \$${DataManager.currentEarnings.toStringAsFixed(2)} ', style: TextStyle(fontSize: 50)), - - SizedBox(height: 20,), + SizedBox( + height: 20, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - GlassButton(onTap: (){ - if(DataManager.currentEarnings <= 1){ - Dialogs.showAlertDialog(context, "Not Enough To Withdraw", "You need atleast \$1 to initiate a withdraw."); - return; - } + GlassButton( + onTap: () { + if (DataManager.currentEarnings <= 1) { + Dialogs.showAlertDialog( + context, + "Not Enough To Withdraw", + "You need atleast \$1 to initiate a withdraw."); + return; + } - if(!DataManager.UserJson['wd_address'].toString().contains("@")){ - Dialogs.showAlertDialog(context, "Invalid Withdrawal Address", "Please enter a valid email address for coinbase address. Your earnings will be sent to that address via coinbase"); - return; - } + if (!DataManager.UserJson['wd_address'] + .toString() + .contains("@")) { + Dialogs.showAlertDialog( + context, + "Invalid Withdrawal Address", + "Please enter a valid email address for coinbase address. Your earnings will be sent to that address via coinbase"); + return; + } - Navigator.of(context).push(wdRoute); - }, child: Text("Withdraw"),height: 40, width: 200, color: Colors.greenAccent), - GlassButton(onTap: (){ - Navigator.of(context).push(MaterialPageRoute( - builder: (BuildContext context) => - WithdrawalHistoryPage())); - }, child: Icon(Icons.history), width: 60, height: 40) + Navigator.of(context).push(wdRoute); + }, + child: Text("Withdraw"), + height: 40, + width: 200, + color: Colors.greenAccent), + GlassButton( + onTap: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (BuildContext context) => + WithdrawalHistoryPage())); + }, + child: Icon(Icons.history), + width: 60, + height: 40) ], ) ], ), ), ), - (DataManager.currentEarnings <=0) ? Container() : Column(children: [ - SizedBox( - height: 30, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text("Sort earnings by "), - SizedBox( - width: 20, - ), - GlassCard( - child: Padding( - padding: - const EdgeInsets.symmetric(vertical: 8.0, horizontal: 15), - child: Row( + (DataManager.currentEarnings <= 0) + ? Container() + : Column(children: [ + SizedBox( + height: 30, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, children: [ - InkWell( - onTap: () { - setState(() { - sortByGames = true; - }); - }, - child: GlassCard( - highlighted: sortByGames, - child: Padding( - padding: EdgeInsets.symmetric( - vertical: 8, horizontal: 20), - child: Text("Game"), - ))), + Text("Sort earnings by "), SizedBox( - width: 5, + width: 20, ), - InkWell( - onTap: () { - setState(() { - sortByGames = false; - }); - }, - child: GlassCard( - highlighted: !sortByGames, - child: Padding( - padding: EdgeInsets.symmetric( - vertical: 8, horizontal: 20), - child: Text("Crypto"), - ))), + GlassCard( + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 8.0, horizontal: 15), + child: Row( + children: [ + InkWell( + onTap: () { + setState(() { + sortByGames = true; + }); + }, + child: GlassCard( + highlighted: sortByGames, + child: Padding( + padding: EdgeInsets.symmetric( + vertical: 8, horizontal: 20), + child: Text("Game"), + ))), + SizedBox( + width: 5, + ), + InkWell( + onTap: () { + setState(() { + sortByGames = false; + }); + }, + child: GlassCard( + highlighted: !sortByGames, + child: Padding( + padding: EdgeInsets.symmetric( + vertical: 8, horizontal: 20), + child: Text("Crypto"), + ))), + ], + ), + )) ], ), - )) - ], - ), - SizedBox( - height: 10, - ), - GlassCard( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - children: [ - sortByGames - ? ListView.builder( - shrinkWrap: true, - controller: scrollController, - itemCount: DataManager.GamesEarnings.length, - itemBuilder: (BuildContext context, int index) { - String gameName = - DataManager.GamesEarnings.keys.elementAt(index); - dynamic GameJson = Helpers.GetGameFromCode(gameName); - if (GameJson == null) { - Debug.LogError( - ("Error getting game json from ${gameName}. returned:\n$GameJson")); - return GlassCard( - child: Padding( - padding: EdgeInsets.all(16), - child: Text( - "Error", - textAlign: TextAlign.center, - ), - )); - } - double amount = Helpers.SatsToCoin(DataManager - .GamesEarnings.values - .elementAt(index)); + SizedBox( + height: 10, + ), + GlassCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + sortByGames + ? ListView.builder( + shrinkWrap: true, + controller: scrollController, + itemCount: DataManager.GamesEarnings.length, + itemBuilder: (BuildContext context, int index) { + String gameName = DataManager.GamesEarnings.keys + .elementAt(index); + dynamic GameJson = + Helpers.GetGameFromCode(gameName); + if (GameJson == null) { + Debug.LogError( + ("Error getting game json from ${gameName}. returned:\n$GameJson")); + return GlassCard( + child: Padding( + padding: EdgeInsets.all(16), + child: Text( + "Error", + textAlign: TextAlign.center, + ), + )); + } + double amount = Helpers.SatsToCoin(DataManager + .GamesEarnings.values + .elementAt(index)); - return WalletGameListItem(GameJson, amount); - }) - : ListView.builder( - shrinkWrap: true, - controller: scrollController, - itemCount: DataManager.CryptoEarnings.length, - itemBuilder: (BuildContext context, int index) { - return WalletCurrencyListItem( - DataManager.CryptoEarnings.keys.elementAt(index)); - }, - ) - ], - ), - )) - ]) + return WalletGameListItem(GameJson, amount); + }) + : ListView.builder( + shrinkWrap: true, + controller: scrollController, + itemCount: DataManager.CryptoEarnings.length, + itemBuilder: (BuildContext context, int index) { + return WalletCurrencyListItem(DataManager + .CryptoEarnings.keys + .elementAt(index)); + }, + ) + ], + ), + )) + ]) ], ); } + TextEditingController TxtRefId = TextEditingController(); + + Widget share() { + return Padding( + padding: EdgeInsets.all(20), + child: Column( + children: [ + GlassCard( + child: Container( + padding: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text("Referral Program", style: TextStyle(fontSize: 18)), + SizedBox(width: 10,), + InkWell(child: Container(padding: EdgeInsets.all(5),child: Icon(Icons.help),), + onTap: (){ + Dialogs.showAlertDialog(context, "Referral Program", "Share your Referral ID among your friends.\nFor each submission of your Referral ID, You'll receive a Reward!"); + },) + ], + ), + SizedBox( + height: 20, + ), + // Text("Earn 0.00000500 ETH for sharing with each friend."),//${DataManager.Settings['ref_reward']} + Text("Earn"), + SizedBox(height: 5,), + Text("0.00000100 BTC", style: TextStyle(fontWeight: FontWeight.bold,color: Colors.greenAccent,fontSize: 16)), + Text("For Sharing with each Friend"), + + SizedBox(height: 30,), + Text("Your Referral ID"), + InkWell( + onTap: (){ + Share.share('Join this platform with my referral ${DataManager.UserJson['id']}\nhttps://play.google.com/store/apps/details?id=com.Xperience.FaucetHub'); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text(DataManager.UserJson['id'].toString(),style: TextStyle(fontSize: 50,fontWeight: FontWeight.bold),), + SizedBox(width: 15,), + Icon(Icons.share,size: 40) + ], + ), + ), + SizedBox( + height: 20, + ), + GlassButton(onTap: (){ + if(DataManager.UserJson["refer"] != "0"){ + return; + } + AlertDialog alert = AlertDialog( + backgroundColor: Color(0xFF1F1F1F), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(40)), + title: Text("Enter a Referral",textAlign: TextAlign.center,), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text("Enter your friends Referral ID",textAlign: TextAlign.center,), + TextField(controller: refController,) + ], + ), + actions: [ + TextButton( + child: Text("Submit"), + onPressed: () async{ + Navigator.of(context).pop(); + Dialogs.waiting(); + await Future.delayed(const Duration(seconds: 3)); + Dialogs.hide(); + }, + ), + TextButton( + child: Text("Cancel"), + onPressed: () { + Navigator.of(context).pop(); + }, + ) + ], + + ); + + showDialog(context: context, builder: (BuildContext context){return alert;}); + }, child: Text((DataManager.UserJson["refer"] == "0") ? "Use Referral" : "Already Reffered to ${DataManager.UserJson["refer"]}"), width: 200,height: 40, color: Colors.greenAccent), + SizedBox(height: 10,) + ], + ), + )), + SizedBox(height: 20,), + InkWell( + onTap: () async{ + + await LaunchApp.openApp( + androidPackageName: 'https://play.google.com/store/apps/details?id=com.Xperience.FaucetHub', + // openStore: false + ); + await DataManager.Review(); + + setState(() { + + }); + }, + child: GlassCard(child: Container(padding: EdgeInsets.all(10), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text("Review on Playstore", style: TextStyle(fontSize: 18)), + SizedBox(width: 10,), + Container(padding: EdgeInsets.all(5),child: Icon(Icons.star)), + Text("5"), + + ], + ), + (DataManager.UserJson["review"] == "0") ? Text("Get 0.00000300 BTC", style: TextStyle(color: Colors.greenAccent, fontWeight: FontWeight.bold)) : Container() + ], + ),)), + ) + ], + ), + ); + } + + TextEditingController refController = TextEditingController(); + Widget WalletGameListItem(dynamic GameJson, double amount) { return Padding( padding: const EdgeInsets.all(3.0), @@ -604,56 +772,84 @@ class _HomeState extends State with WidgetsBindingObserver { )), ); } + TextEditingController TxtCoinbaseAddress = TextEditingController(); Widget settings() { return Column( children: [ - GlassCard(child: AnimatedSize( + GlassCard( + child: AnimatedSize( duration: const Duration(milliseconds: 200), - child: Padding(padding: EdgeInsets.all(15), child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text("Coinbase Address"), - InkWell(onTap: (){Dialogs.ShowCoinbaseDialog(context);},child: Icon(Icons.help)) - ], - ), - TextField(controller: TxtCoinbaseAddress, onChanged: (e){setState(() { - - });},), - (TxtCoinbaseAddress.text != (DataManager.UserJson['wd_address'] ?? "") )? Container(padding: EdgeInsets.all(10), child: GlassButton(onTap: () async{ - String response = await DataManager.SetWdAddress(TxtCoinbaseAddress.text); - bool success = response == TxtCoinbaseAddress.text; - // DataManager.UserJson['wd_address'] = TxtCoinbaseAddress.text; - if(!success){ - Dialogs.showAlertDialog(context, "Error saving Coinbase Address", response); - } - setState(() { - - }); - }, child: Text("Save"), width: 250),) : Container() - ], - ),), + child: Padding( + padding: EdgeInsets.all(15), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text("Coinbase Address"), + InkWell( + onTap: () { + Dialogs.ShowCoinbaseDialog(context); + }, + child: Icon(Icons.help)) + ], + ), + TextField( + controller: TxtCoinbaseAddress, + onChanged: (e) { + setState(() {}); + }, + ), + (TxtCoinbaseAddress.text != + (DataManager.UserJson['wd_address'] ?? "")) + ? Container( + padding: EdgeInsets.all(10), + child: GlassButton( + onTap: () async { + String response = await DataManager.SetWdAddress( + TxtCoinbaseAddress.text); + bool success = + response == TxtCoinbaseAddress.text; + // DataManager.UserJson['wd_address'] = TxtCoinbaseAddress.text; + if (!success) { + Dialogs.showAlertDialog(context, + "Error saving Coinbase Address", response); + } + setState(() {}); + }, + child: Text("Save"), + width: 250), + ) + : Container() + ], + ), + ), )), - SizedBox(height: 10,), + SizedBox( + height: 10, + ), InkWell( - onTap: ()async{ + onTap: () async { final prefs = await SharedPreferences.getInstance(); prefs.clear(); - Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (context) => - MyHomePage()), (Route route) => false); + Navigator.of(context).pushAndRemoveUntil( + MaterialPageRoute(builder: (context) => MyHomePage()), + (Route route) => false); DataManager.Reset(); }, - child: GlassCard(child: Padding( + child: GlassCard( + child: Padding( padding: const EdgeInsets.all(15.0), child: Row( children: [ Row( children: [ Icon(Icons.logout), - SizedBox(width: 10,), + SizedBox( + width: 10, + ), Text("Signout"), ], ) @@ -681,7 +877,10 @@ class _HomeState extends State with WidgetsBindingObserver { children: [ Text(gameName, style: TextStyle(fontSize: 16)), Row( - children: [Icon(Helpers.GetIconForCrypto(coin)), Text(" $coin")], + children: [ + Icon(Helpers.GetIconForCrypto(coin)), + Text(" $coin") + ], ) ], ), diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 625a5d1..2147936 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -9,6 +9,7 @@ import connectivity_plus import firebase_auth import firebase_core import path_provider_foundation +import share_plus import shared_preferences_foundation import sqflite import url_launcher_macos @@ -18,6 +19,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) diff --git a/pubspec.lock b/pubspec.lock index 92dff84..40557d1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -113,6 +113,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.4" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" + url: "https://pub.dev" + source: hosted + version: "0.3.3+4" crypto: dependency: transitive description: @@ -376,6 +384,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" nm: dependency: transitive description: @@ -496,6 +512,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.27.7" + share_plus: + dependency: "direct main" + description: + name: share_plus + sha256: "6cec740fa0943a826951223e76218df002804adb588235a8910dc3d6b0654e11" + url: "https://pub.dev" + source: hosted + version: "7.1.0" + share_plus_platform_interface: + dependency: transitive + description: + name: share_plus_platform_interface + sha256: "357412af4178d8e11d14f41723f80f12caea54cf0d5cd29af9dcdab85d58aea7" + url: "https://pub.dev" + source: hosted + version: "3.3.0" shared_preferences: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 3c57701..123c939 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -44,6 +44,7 @@ dependencies: intl: ^0.18.1 cached_network_image: ^3.2.3 connectivity_plus: ^4.0.2 + share_plus: ^7.1.0 dev_dependencies: flutter_test: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index c424237..01165cf 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -8,6 +8,7 @@ #include #include +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { @@ -15,6 +16,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); FirebaseCorePluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); + SharePlusWindowsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 25eb2c0..bd03ace 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -5,6 +5,7 @@ list(APPEND FLUTTER_PLUGIN_LIST connectivity_plus firebase_core + share_plus url_launcher_windows )