dialog_pp_flutter 1.0.17 dialog_pp_flutter: ^1.0.17 copied to clipboard
Perosnal Use
example/lib/main.dart
import 'dart:async';
import 'package:dialog_pp_flutter/api_call.dart';
import 'package:dialog_pp_flutter/dialog_pp_flutter.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
Future<void> main() async {
await PPDialog.newVersionCode();
await await advertisementDrawerApi("");
runApp(ScreenUtilInit(
builder: (context, child) => const GetMaterialApp(
home: MYYYYY(),
)));
}
class MYYYYY extends StatefulWidget {
const MYYYYY({Key? key}) : super(key: key);
@override
State<MYYYYY> createState() => _MYYYYYState();
}
class _MYYYYYState extends State<MYYYYY> {
ondansd() async {
await advertisementDrawerApi("");
Future.delayed(const Duration(seconds: 3), () {
Get.to(const MyApp());
});
}
@override
void initState() {
// TODO: implement initState
super.initState();
// PPDialog.internetDialogCheck(callback: );
ondansd();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("asd6as56d456as4d56as4d56as4d56as4d56as4d")),
);
}
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
checkVersion() async {}
onCompletetete() {
print("done done");
}
ondansd() {
print("connection done done go go gogogogogo");
}
@override
void initState() {
// TODO: implement initState
super.initState();
PPDialog.termsConditions(context,
privacyPolicyUrl:
"https://pages.flycricket.io/ipl-live-2022/terms.html",
termsConditionUrl:
"https://pages.flycricket.io/ipl-live-2022/terms.html",
isPrivacyPolicy: true);
}
@override
Widget build(BuildContext context) {
return Scaffold(
// drawer: PPDialog.drawerScreen(
// appLogo: "assets/dialogs_assets/playstore.png",
// privacyPolicy:
// "https://sites.google.com/view/bitlinksprivacypolicy/home",
// feedbackEmailId: "mailto:bitlinks.llc@gmail.com",
// emailSubject: "Feedback on Pakistan IPTV Links m3u Playlists",
// emailMessage:
// "Hi,\n\n\nYour Feedback Pakistan IPTV Links m3u Playlists! I would like to give you some feedback:"),
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: InkWell(
onTap: () {},
child: const Text('dsfdsfdsfn\ndsfdsf\ndfsgdsfds\ndfdsfdsfdsfds')),
),
);
}
}
// class CheckConnection extends StatefulWidget {
// @override
// State createState() {
// return _CheckConnection();
// }
// }
//
// class _CheckConnection extends State {
// StreamSubscription? internetconnection;
// bool isoffline = false;
//
// //set variable for Connectivity subscription listiner
//
// @override
// void initState() {
// internetconnection = Connectivity()
// .onConnectivityChanged
// .listen((ConnectivityResult result) {
// // whenevery connection status is changed.
// if (result == ConnectivityResult.none) {
// //there is no any connection
// setState(() {
// isoffline = true;
// });
// } else if (result == ConnectivityResult.mobile) {
// //connection is mobile data network
// setState(() {
// isoffline = false;
// });
// } else if (result == ConnectivityResult.wifi) {
// //connection is from wifi
// setState(() {
// isoffline = false;
// });
// }
// }); // using this listiner, you can get the medium of connection as well.
//
// super.initState();
// }
//
// @override
// dispose() {
// super.dispose();
// internetconnection!.cancel();
// //cancel internent connection subscription after you are done
// }
//
// @override
// Widget build(BuildContext context) {
// return Scaffold(
// appBar: AppBar(title: Text("Check Connection")),
// body: SingleChildScrollView(
// child: Column(
// children: [
// Container(
// child: errmsg("No Internet Connection Available", isoffline),
// //to show internet connection message on isoffline = true.
// ),
// Container(
// //this is your content
// margin: EdgeInsets.all(30),
// width: double.infinity,
// child: Center(
// child: Text("Check Connections",
// style: TextStyle(fontSize: 20))))
// ],
// )));
// }
//
// Widget errmsg(String text, bool show) {
// //error message widget.
// if (show == true) {
// //if error is true then show error message box
// return Container(
// padding: EdgeInsets.all(10.00),
// margin: EdgeInsets.only(bottom: 10.00),
// color: Colors.red,
// child: Row(children: [
// Container(
// margin: EdgeInsets.only(right: 6.00),
// child: Icon(Icons.info, color: Colors.white),
// ), // icon for error message
//
// Text(text, style: TextStyle(color: Colors.white)),
// //show error message text
// ]),
// );
// } else {
// return Container();
// //if error is false, return empty container.
// }
// }
// }