review bonus
This commit is contained in:
parent
f2f8bddedf
commit
9786bcdfce
|
|
@ -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<String,String> Settings = {};
|
||||
|
||||
static List<dynamic> 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<Map<String, dynamic>> linkedGames = jsonDecode(
|
||||
UserJson['linkedGames']).cast<Map<String, dynamic>>();
|
||||
UserJson['linked_games']).cast<Map<String, dynamic>>();
|
||||
|
||||
AllGames.forEach((element) {
|
||||
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{
|
||||
Map<String,String> body = <String, String>{
|
||||
|
|
|
|||
313
lib/home.dart
313
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<Home> 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 {
|
||||
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) {}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -74,12 +79,9 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
|||
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<Home> 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<Home> 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<Home> with WidgetsBindingObserver {
|
|||
return games();
|
||||
case 2:
|
||||
return settings();
|
||||
case 4:
|
||||
return share();
|
||||
default:
|
||||
return home();
|
||||
}
|
||||
|
|
@ -310,7 +324,9 @@ class _HomeState extends State<Home> 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,
|
||||
),
|
||||
)),
|
||||
|
|
@ -343,9 +359,7 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
|||
GameInfoPage(gameJson: list[index])));
|
||||
|
||||
await DataManager.GrabOnce();
|
||||
setState(() {
|
||||
|
||||
});
|
||||
setState(() {});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(12),
|
||||
|
|
@ -363,7 +377,9 @@ class _HomeState extends State<Home> 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,36 +430,56 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
|||
),
|
||||
Text('~ \$${DataManager.currentEarnings.toStringAsFixed(2)} ',
|
||||
style: TextStyle(fontSize: 50)),
|
||||
|
||||
SizedBox(height: 20,),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
GlassButton(onTap: (){
|
||||
GlassButton(
|
||||
onTap: () {
|
||||
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;
|
||||
}
|
||||
|
||||
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");
|
||||
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: (){
|
||||
},
|
||||
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)
|
||||
},
|
||||
child: Icon(Icons.history),
|
||||
width: 60,
|
||||
height: 40)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
(DataManager.currentEarnings <=0) ? Container() : Column(children: [
|
||||
(DataManager.currentEarnings <= 0)
|
||||
? Container()
|
||||
: Column(children: [
|
||||
SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
|
|
@ -456,8 +492,8 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
|||
),
|
||||
GlassCard(
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(vertical: 8.0, horizontal: 15),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8.0, horizontal: 15),
|
||||
child: Row(
|
||||
children: [
|
||||
InkWell(
|
||||
|
|
@ -508,9 +544,10 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
|||
controller: scrollController,
|
||||
itemCount: DataManager.GamesEarnings.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
String gameName =
|
||||
DataManager.GamesEarnings.keys.elementAt(index);
|
||||
dynamic GameJson = Helpers.GetGameFromCode(gameName);
|
||||
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"));
|
||||
|
|
@ -534,8 +571,9 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
|||
controller: scrollController,
|
||||
itemCount: DataManager.CryptoEarnings.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return WalletCurrencyListItem(
|
||||
DataManager.CryptoEarnings.keys.elementAt(index));
|
||||
return WalletCurrencyListItem(DataManager
|
||||
.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) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(3.0),
|
||||
|
|
@ -604,56 +772,84 @@ class _HomeState extends State<Home> 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(
|
||||
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))
|
||||
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;
|
||||
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);
|
||||
Dialogs.showAlertDialog(context,
|
||||
"Error saving Coinbase Address", response);
|
||||
}
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}, child: Text("Save"), width: 250),) : Container()
|
||||
setState(() {});
|
||||
},
|
||||
child: Text("Save"),
|
||||
width: 250),
|
||||
)
|
||||
: Container()
|
||||
],
|
||||
),),
|
||||
),
|
||||
),
|
||||
)),
|
||||
SizedBox(height: 10,),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
prefs.clear();
|
||||
|
||||
Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (context) =>
|
||||
MyHomePage()), (Route<dynamic> route) => false);
|
||||
Navigator.of(context).pushAndRemoveUntil(
|
||||
MaterialPageRoute(builder: (context) => MyHomePage()),
|
||||
(Route<dynamic> 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<Home> with WidgetsBindingObserver {
|
|||
children: [
|
||||
Text(gameName, style: TextStyle(fontSize: 16)),
|
||||
Row(
|
||||
children: [Icon(Helpers.GetIconForCrypto(coin)), Text(" $coin")],
|
||||
children: [
|
||||
Icon(Helpers.GetIconForCrypto(coin)),
|
||||
Text(" $coin")
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
|
|
|
|||
32
pubspec.lock
32
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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <connectivity_plus/connectivity_plus_windows_plugin.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>
|
||||
|
||||
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"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
connectivity_plus
|
||||
firebase_core
|
||||
share_plus
|
||||
url_launcher_windows
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user