review bonus

This commit is contained in:
sewmina7@gmail.com 2023-09-24 22:46:37 +05:30
parent f2f8bddedf
commit 9786bcdfce
7 changed files with 435 additions and 172 deletions

View File

@ -7,7 +7,7 @@ import 'DebugHelper.dart';
class DataManager{ class DataManager{
static int ClientVersion = 2; 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<String,String> Settings = {}; static Map<String,String> Settings = {};
static List<dynamic> AllGames = []; static List<dynamic> AllGames = [];
@ -104,14 +104,14 @@ class DataManager{
Debug.Log("err044 : $UserJson"); Debug.Log("err044 : $UserJson");
LinkedGamesJson = []; LinkedGamesJson = [];
NonLinkedGamesJson = []; NonLinkedGamesJson = [];
if (UserJson['linkedGames'] if (UserJson['linked_games']
.toString() .toString()
.length < 3) { .length < 3) {
NonLinkedGamesJson = AllGames; NonLinkedGamesJson = AllGames;
return; return;
} }
List<Map<String, dynamic>> linkedGames = jsonDecode( List<Map<String, dynamic>> linkedGames = jsonDecode(
UserJson['linkedGames']).cast<Map<String, dynamic>>(); UserJson['linked_games']).cast<Map<String, dynamic>>();
AllGames.forEach((element) { AllGames.forEach((element) {
bool foundLink = false; bool foundLink = false;
@ -325,6 +325,31 @@ class DataManager{
} }
} }
static Future<int> Review() async{
var loginResponse = null;
try {
loginResponse = (await http.post(
Uri.parse('${DataManager.API_ENDPOINT}review.php'),
body: <String, String>{
"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<List<dynamic>> GetWithdrawalHistory() async{ static Future<List<dynamic>> GetWithdrawalHistory() async{
Map<String,String> body = <String, String>{ Map<String,String> body = <String, String>{

View File

@ -1,6 +1,7 @@
import 'package:animated_text_kit/animated_text_kit.dart'; import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:connectivity_plus/connectivity_plus.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/DataManager.dart';
import 'package:fhub/backend/DebugHelper.dart'; import 'package:fhub/backend/DebugHelper.dart';
import 'package:fhub/backend/Dialogs.dart'; import 'package:fhub/backend/Dialogs.dart';
@ -13,6 +14,7 @@ import 'package:fhub/welcome.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:share_plus/share_plus.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'backend/helpers.dart'; import 'backend/helpers.dart';
@ -35,19 +37,22 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) async{ subscription = Connectivity()
.onConnectivityChanged
.listen((ConnectivityResult result) async {
// Got a new connectivity status! // Got a new connectivity status!
try { try {
final connectivityResult = await (Connectivity().checkConnectivity()); final connectivityResult = await (Connectivity().checkConnectivity());
Debug.Log(connectivityResult); Debug.Log(connectivityResult);
if(connectivityResult != ConnectivityResult.mobile && connectivityResult != ConnectivityResult.mobile && connectivityResult != ConnectivityResult.ethernet){ if (connectivityResult != ConnectivityResult.mobile &&
Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (_)=>OfflinePage(id:0))); connectivityResult != ConnectivityResult.mobile &&
connectivityResult != ConnectivityResult.ethernet) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (_) => OfflinePage(id: 0)));
return; return;
} }
}catch(e){ } catch (e) {}
}
}); });
} }
@ -74,12 +79,9 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
void Refresh() async { void Refresh() async {
await DataManager.GrabOnce(); await DataManager.GrabOnce();
setState(() { setState(() {});
});
} }
void kickstartAnimations() async { void kickstartAnimations() async {
await Future.delayed(const Duration(milliseconds: 500)); await Future.delayed(const Duration(milliseconds: 500));
@ -111,12 +113,12 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
}, },
bottomNav: [ bottomNav: [
BottomNavBarItem( BottomNavBarItem(
icon: Icons.home, icon: Icons.people,
active: selectedPageId == 0, active: selectedPageId == 4,
onPressed: () { onPressed: () {
setState(() { setState(() {
TitleText = "Home"; TitleText = "Share";
selectedPageId = 0; selectedPageId = 4;
}); });
}, },
), ),
@ -129,6 +131,16 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
selectedPageId = 3; selectedPageId = 3;
}); });
}), }),
BottomNavBarItem(
icon: Icons.home,
active: selectedPageId == 0,
onPressed: () {
setState(() {
TitleText = "Home";
selectedPageId = 0;
});
},
),
BottomNavBarItem( BottomNavBarItem(
icon: Icons.wallet, icon: Icons.wallet,
active: selectedPageId == 1, active: selectedPageId == 1,
@ -191,6 +203,8 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
return games(); return games();
case 2: case 2:
return settings(); return settings();
case 4:
return share();
default: default:
return home(); return home();
} }
@ -310,7 +324,9 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Text( 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, textAlign: TextAlign.center,
), ),
)), )),
@ -343,9 +359,7 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
GameInfoPage(gameJson: list[index]))); GameInfoPage(gameJson: list[index])));
await DataManager.GrabOnce(); await DataManager.GrabOnce();
setState(() { setState(() {});
});
}, },
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
@ -363,7 +377,9 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
width: 50, width: 50,
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
child: CachedNetworkImage(imageUrl: list[index]['icon'],) child: CachedNetworkImage(
imageUrl: list[index]['icon'],
)
// child: Image.network(list[index]['icon']) // child: Image.network(list[index]['icon'])
)), )),
Icon(Helpers.GetIconForCrypto(list[index]['coin'])) Icon(Helpers.GetIconForCrypto(list[index]['coin']))
@ -414,36 +430,56 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
), ),
Text('~ \$${DataManager.currentEarnings.toStringAsFixed(2)} ', Text('~ \$${DataManager.currentEarnings.toStringAsFixed(2)} ',
style: TextStyle(fontSize: 50)), style: TextStyle(fontSize: 50)),
SizedBox(
SizedBox(height: 20,), height: 20,
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
GlassButton(onTap: (){ GlassButton(
onTap: () {
if (DataManager.currentEarnings <= 1) { if (DataManager.currentEarnings <= 1) {
Dialogs.showAlertDialog(context, "Not Enough To Withdraw", "You need atleast \$1 to initiate a withdraw."); Dialogs.showAlertDialog(
context,
"Not Enough To Withdraw",
"You need atleast \$1 to initiate a withdraw.");
return; return;
} }
if(!DataManager.UserJson['wd_address'].toString().contains("@")){ if (!DataManager.UserJson['wd_address']
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"); .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; return;
} }
Navigator.of(context).push(wdRoute); Navigator.of(context).push(wdRoute);
}, child: Text("Withdraw"),height: 40, width: 200, color: Colors.greenAccent), },
GlassButton(onTap: (){ child: Text("Withdraw"),
height: 40,
width: 200,
color: Colors.greenAccent),
GlassButton(
onTap: () {
Navigator.of(context).push(MaterialPageRoute( Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => builder: (BuildContext context) =>
WithdrawalHistoryPage())); WithdrawalHistoryPage()));
}, child: Icon(Icons.history), width: 60, height: 40) },
child: Icon(Icons.history),
width: 60,
height: 40)
], ],
) )
], ],
), ),
), ),
), ),
(DataManager.currentEarnings <=0) ? Container() : Column(children: [ (DataManager.currentEarnings <= 0)
? Container()
: Column(children: [
SizedBox( SizedBox(
height: 30, height: 30,
), ),
@ -456,8 +492,8 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
), ),
GlassCard( GlassCard(
child: Padding( child: Padding(
padding: padding: const EdgeInsets.symmetric(
const EdgeInsets.symmetric(vertical: 8.0, horizontal: 15), vertical: 8.0, horizontal: 15),
child: Row( child: Row(
children: [ children: [
InkWell( InkWell(
@ -508,9 +544,10 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
controller: scrollController, controller: scrollController,
itemCount: DataManager.GamesEarnings.length, itemCount: DataManager.GamesEarnings.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
String gameName = String gameName = DataManager.GamesEarnings.keys
DataManager.GamesEarnings.keys.elementAt(index); .elementAt(index);
dynamic GameJson = Helpers.GetGameFromCode(gameName); dynamic GameJson =
Helpers.GetGameFromCode(gameName);
if (GameJson == null) { if (GameJson == null) {
Debug.LogError( Debug.LogError(
("Error getting game json from ${gameName}. returned:\n$GameJson")); ("Error getting game json from ${gameName}. returned:\n$GameJson"));
@ -534,8 +571,9 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
controller: scrollController, controller: scrollController,
itemCount: DataManager.CryptoEarnings.length, itemCount: DataManager.CryptoEarnings.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return WalletCurrencyListItem( return WalletCurrencyListItem(DataManager
DataManager.CryptoEarnings.keys.elementAt(index)); .CryptoEarnings.keys
.elementAt(index));
}, },
) )
], ],
@ -546,6 +584,136 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
); );
} }
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) { Widget WalletGameListItem(dynamic GameJson, double amount) {
return Padding( return Padding(
padding: const EdgeInsets.all(3.0), padding: const EdgeInsets.all(3.0),
@ -604,56 +772,84 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
)), )),
); );
} }
TextEditingController TxtCoinbaseAddress = TextEditingController(); TextEditingController TxtCoinbaseAddress = TextEditingController();
Widget settings() { Widget settings() {
return Column( return Column(
children: [ children: [
GlassCard(child: AnimatedSize( GlassCard(
child: AnimatedSize(
duration: const Duration(milliseconds: 200), duration: const Duration(milliseconds: 200),
child: Padding(padding: EdgeInsets.all(15), child: Column( child: Padding(
padding: EdgeInsets.all(15),
child: Column(
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text("Coinbase Address"), Text("Coinbase Address"),
InkWell(onTap: (){Dialogs.ShowCoinbaseDialog(context);},child: Icon(Icons.help)) InkWell(
onTap: () {
Dialogs.ShowCoinbaseDialog(context);
},
child: Icon(Icons.help))
], ],
), ),
TextField(controller: TxtCoinbaseAddress, onChanged: (e){setState(() { TextField(
controller: TxtCoinbaseAddress,
});},), onChanged: (e) {
(TxtCoinbaseAddress.text != (DataManager.UserJson['wd_address'] ?? "") )? Container(padding: EdgeInsets.all(10), child: GlassButton(onTap: () async{ setState(() {});
String response = await DataManager.SetWdAddress(TxtCoinbaseAddress.text); },
bool success = response == TxtCoinbaseAddress.text; ),
(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; // DataManager.UserJson['wd_address'] = TxtCoinbaseAddress.text;
if (!success) { if (!success) {
Dialogs.showAlertDialog(context, "Error saving Coinbase Address", response); Dialogs.showAlertDialog(context,
"Error saving Coinbase Address", response);
} }
setState(() { setState(() {});
},
}); child: Text("Save"),
}, child: Text("Save"), width: 250),) : Container() width: 250),
)
: Container()
], ],
),), ),
),
)), )),
SizedBox(height: 10,), SizedBox(
height: 10,
),
InkWell( InkWell(
onTap: () async { onTap: () async {
final prefs = await SharedPreferences.getInstance(); final prefs = await SharedPreferences.getInstance();
prefs.clear(); prefs.clear();
Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (context) => Navigator.of(context).pushAndRemoveUntil(
MyHomePage()), (Route<dynamic> route) => false); MaterialPageRoute(builder: (context) => MyHomePage()),
(Route<dynamic> route) => false);
DataManager.Reset(); DataManager.Reset();
}, },
child: GlassCard(child: Padding( child: GlassCard(
child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Row( child: Row(
children: [ children: [
Row( Row(
children: [ children: [
Icon(Icons.logout), Icon(Icons.logout),
SizedBox(width: 10,), SizedBox(
width: 10,
),
Text("Signout"), Text("Signout"),
], ],
) )
@ -681,7 +877,10 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
children: [ children: [
Text(gameName, style: TextStyle(fontSize: 16)), Text(gameName, style: TextStyle(fontSize: 16)),
Row( Row(
children: [Icon(Helpers.GetIconForCrypto(coin)), Text(" $coin")], children: [
Icon(Helpers.GetIconForCrypto(coin)),
Text(" $coin")
],
) )
], ],
), ),

View File

@ -9,6 +9,7 @@ import connectivity_plus
import firebase_auth import firebase_auth
import firebase_core import firebase_core
import path_provider_foundation import path_provider_foundation
import share_plus
import shared_preferences_foundation import shared_preferences_foundation
import sqflite import sqflite
import url_launcher_macos import url_launcher_macos
@ -18,6 +19,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
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"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))

View File

@ -113,6 +113,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.4" 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: crypto:
dependency: transitive dependency: transitive
description: description:
@ -376,6 +384,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.9.1"
mime:
dependency: transitive
description:
name: mime
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
url: "https://pub.dev"
source: hosted
version: "1.0.4"
nm: nm:
dependency: transitive dependency: transitive
description: description:
@ -496,6 +512,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.27.7" 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: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@ -44,6 +44,7 @@ dependencies:
intl: ^0.18.1 intl: ^0.18.1
cached_network_image: ^3.2.3 cached_network_image: ^3.2.3
connectivity_plus: ^4.0.2 connectivity_plus: ^4.0.2
share_plus: ^7.1.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

View File

@ -8,6 +8,7 @@
#include <connectivity_plus/connectivity_plus_windows_plugin.h> #include <connectivity_plus/connectivity_plus_windows_plugin.h>
#include <firebase_core/firebase_core_plugin_c_api.h> #include <firebase_core/firebase_core_plugin_c_api.h>
#include <share_plus/share_plus_windows_plugin_c_api.h>
#include <url_launcher_windows/url_launcher_windows.h> #include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
@ -15,6 +16,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
FirebaseCorePluginCApiRegisterWithRegistrar( FirebaseCorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
SharePlusWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
UrlLauncherWindowsRegisterWithRegistrar( UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows")); registry->GetRegistrarForPlugin("UrlLauncherWindows"));
} }

View File

@ -5,6 +5,7 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
connectivity_plus connectivity_plus
firebase_core firebase_core
share_plus
url_launcher_windows url_launcher_windows
) )