report_previewer 0.0.6
report_previewer: ^0.0.6 copied to clipboard
A Flutter package providing a widget for previewing reports.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:get/route_manager.dart';
import 'package:report_previewer/report_previewer.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 GetMaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// TRY THIS: Try running your application with "flutter run". You'll see
// the application has a purple toolbar. Then, without quitting the app,
// try changing the seedColor in the colorScheme below to Colors.green
// and then invoke "hot reload" (save your changes or press the "hot
// reload" button in a Flutter-supported IDE, or press "r" if you used
// the command line to start the app).
//
// Notice that the counter didn't reset back to zero; the application
// state is not lost during the reload. To reset the state, use hot
// restart instead.
//
// This works for code too, not just values: Most code changes can be
// tested with just a hot reload.
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
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;
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++;
});
}
@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(
// TRY THIS: Try changing the color here to a specific color (to
// Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
// change color while the other colors stay the same.
backgroundColor: Colors.black,
// 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: const Text(
"OneCB Modules",
style: TextStyle(color: Colors.white),
),
),
body: const ReportsModule(
environment: 'dev',
subdomain: 'cashier',
baseUrl: 'https://cashier.dev-1.onecoopbank.com/gate',
endpoint: '/api',
token:
'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJwUTYwdnFqRV9jbURibGgwcVBqUnRtMzZ1TlQtRlZlbmpuUjhiN1Z3YzhVIn0.eyJleHAiOjE3NTcyNjI1MDEsImlhdCI6MTc1NjM5ODUwMSwianRpIjoiNWM5NGYzNjItZTJjMS00NDZjLWJiNmItOGFlZjYxY2JkMGNjIiwiaXNzIjoiaHR0cHM6Ly9wLTY3NGU3NzYzNTFlYzIyNjUzYTMxZWY1Ny1rZXljbG9hay1hcGkuZGV2Lm9uZWNvb3BiYW5rLmNvbS9yZWFsbXMvT25lQ29vcEJhbmsiLCJhdWQiOlsicmVhbG0tbWFuYWdlbWVudCIsImFjY291bnQiXSwic3ViIjoiZWUzYjk0MGMtOWNjYS00YmVmLWJkODEtMDIyMTdlMWMwYTllIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiMWNvb3BiYW5rLWNsaWVudCIsInNlc3Npb25fc3RhdGUiOiJiMjZkNjgzNy1iOTk2LTQ1NGEtOTdmMy01ODY5ZTI0MDBkMGYiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbIi8qIl0sInJlc291cmNlX2FjY2VzcyI6eyJyZWFsbS1tYW5hZ2VtZW50Ijp7InJvbGVzIjpbInZpZXctaWRlbnRpdHktcHJvdmlkZXJzIiwidmlldy1yZWFsbSIsIm1hbmFnZS1pZGVudGl0eS1wcm92aWRlcnMiLCJpbXBlcnNvbmF0aW9uIiwicmVhbG0tYWRtaW4iLCJjcmVhdGUtY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