dialog_pp_flutter 0.0.4 dialog_pp_flutter: ^0.0.4 copied to clipboard
Perosnal Use
example/lib/main.dart
import 'dart:async';
import 'package:dialog_pp_flutter/dialog_pp_flutter.dart';
import 'package:dialog_pp_flutter/get_controller.dart';
import 'package:flutter/material.dart';
Future<void> main() async {
await PPDialog.newVersionCode();
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
initPlatformState();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
checkVersion();
}
checkVersion() async {
print(AppDetailsPP.to.appName.value);
print(AppDetailsPP.to.packageName.value);
print(AppDetailsPP.to.versionApp.value);
print(AppDetailsPP.to.buildNumber.value);
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: InkWell(
onTap: () {
Future.delayed(Duration(seconds: 0), () {
PPDialog.updateDialog(
context,
isPopupRequired: true,
isPopup: true,
apiVersionCode: 3,
appLogoApi:
"https://play-lh.googleusercontent.com/c2DcVsBUhJb3UlAGABHwafpuhstHwORpVwWZ0RvWY7NPrgdtT2o4JRhcyO49ehhUNRca=w240-h480-rw",
appNameApi: "Instagram",
subtitleAppApi:
"Share videos, photos, and fun moments with the friends you love",
appWebsiteUrl:
"https://play.google.com/store/apps/details?id=com.instagram.android",
);
});
},
child: Text('sdsfdsf')),
),
),
);
}
}