pti_insurance_test 0.0.2
pti_insurance_test: ^0.0.2 copied to clipboard
Flutter plugin to add PTI Insurance Widget inside your project.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:pti_insurance_test/pti_insurance_test.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
String token =
"FPjv/4woH0pwj5JIKnHQSqCekCvugw6F4XHEny5/DAEirW4DzhZcqUL6mFMicTakwrJbxvAqAh6ogNMvJldjNBBJ2W9RKk4GjkprbKznUjGGklMHZr2oK2XOBCNj1Wd/gfWZ0ouG7Ebgz0Cb6wBFDlc+WtrTXNoXWH1AYn1sWmlA0YFrFESZ8HIsXl/bIId2adoolnSUqdFWpt90bAQmCWFcI9nmgta/Yzp5ogB9TF5O0/H7n9b1QB/jQzEYaEbjHi/8CLjUOZUlWe0ymTd9uaDSiUZZyDdvekj1l4CZ3iZaMUx0Ak8j6oApkO79gvuQ3LpwMF0Gw/HysgzCujQ5cnEFDHQ2XG1JW3UC7dtumNm2aQWh5/qK6/U5RX7xnzP6rnyL0Z2W7ep+vVk11DMhD6BGiN6xHIWOBQGHDEPkaNWSRBUePq6b96BGwJzDbFSNDw9p5+vcsXSTFEHJ6hNR1mED1cotfmJStvDgkaCeh/8silZjqPc/NEzJ6Vz/ef2wvff4JtbdksCj3bCcw8YZyEXE7jyd5XonK874Piqv/y+aSImTMWpZ36jgioAGP/e4CidtNVt7G9MKdOQiiT0wYCNS/zkJ7ceUL/YKTeqlRtBmq9m6usA2vL4pcck6r+At6XOrSB+LfZADXpRA3Qx2F1OwzKa5UugUBj9UBa6vi8OAEpWxvHsf809NZTjG6Nem1Bk+8o2O7UgXIz8RE4J1Wfe3Mw+PVJngHP8TDEcWASWTSTiPLPWKG6Mu6DpbEXesu8g6F+3p53iChgr0qkF18DARaNF+ssMVahBhVQyMi+J/8QTeFHmg+padvGSWmpkPLd0nnlM8AgsKpVmrAOc9Kl4h468AWF6kBJGFa9aSquLX4dz63Easu5B5q3Qi5KgNjqC/XSOCrBtdHQ+MUjU+eKpSW89XjuDiiYQ+ZLdSw7kFjrobnmQczYflF16fxNiz+9G8sqR1UKC4g3gYhzVj0rXLnbFWlGE4mcdmB00t6vBgSu5qg6FA8pn116tEk1HbI1bRQ3o5srCQ8ElesKd/SLTuzLIIe/YPCZdYJkNyAkR2XvmJO8NnV3P1Ta8ed4AL4C5VTL4D/LwJt1AZBtaFOucATbIxFr1npLJcb03tGR9zuAnKs/0ePmpPrD6LOY6uYpZwflj1ARf3+SCxtSmqStfSI0Rre6UORmrmmNhK7bGpBy3XXyBvae4+3AqfSGCd633J+mNGzw2W6ahJU//tIu9GgkHQLRmbOa0cFzxNNpnbbs+mXoUu2jDz4IZOqggoQe9yEXpA45PI2hzgrGDUOGw1+AgyP8U31Jq0awvf+prK5VBOYZ35TOMeREwjwn+ywNr4Su5hjJkNNnaJ9ZruTpcaITzOU4QXF/mj0//BUEYP0Zx5TwTNSR53hgIC0Az8";
void _incrementCounter() {
// setState(() {
// // This call to setState tells the Flutter framework that something has
// // changed in this State, which causes it to rerun the build method below
// // so that the display can reflect the updated values. If we changed
// // _counter without calling setState(), then the build method would not be
// // called again, and so nothing would appear to happen.
// _counter++;
// });
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PtiView(
token: token,
kenh: "IVND",
maCN: "VND",
maNV: "2B",
)),
);
}
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
//
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
appBar: AppBar(
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
body: DemoView(),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}