report_previewer 0.0.8
report_previewer: ^0.0.8 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> {
@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.eyJleHAiOjE3NTczMDQ0OTgsImlhdCI6MTc1NjQ0MDQ5OCwianRpIjoiOGI5NzExYzEtMmMxYS00ZDlmLWEzNzUtZWVkMWNlMzQ1MzM3IiwiaXNzIjoiaHR0cHM6Ly9wLTY3NGU3NzYzNTFlYzIyNjUzYTMxZWY1Ny1rZXljbG9hay1hcGkuZGV2Lm9uZWNvb3BiYW5rLmNvbS9yZWFsbXMvT25lQ29vcEJhbmsiLCJhdWQiOlsicmVhbG0tbWFuYWdlbWVudCIsImFjY291bnQiXSwic3ViIjoiZWUzYjk0MGMtOWNjYS00YmVmLWJkODEtMDIyMTdlMWMwYTllIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiMWNvb3BiYW5rLWNsaWVudCIsInNlc3Npb25fc3RhdGUiOiI5OTFlNGFiOS00NWIzLTRkY2QtYmFjYS0yNmQ1MzBjZjBjYWQiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbIi8qIl0sInJlc291cmNlX2FjY2VzcyI6eyJyZWFsbS1tYW5hZ2VtZW50Ijp7InJvbGVzIjpbInZpZXctaWRlbnRpdHktcHJvdmlkZXJzIiwidmlldy1yZWFsbSIsIm1hbmFnZS1pZGVudGl0eS1wcm92aWRlcnMiLCJpbXBlcnNvbmF0aW9uIiwicmVhbG0tYWRtaW4iLCJjcmVhdGUtY2xpZW50IiwibWFuYWdlLXVzZXJzIiwicXVlcnktcmVhbG1zIiwidmlldy1hdXRob3JpemF0aW9uIiwicXVlcnktY2xpZW50cyIsInF1ZXJ5LXVzZXJzIiwibWFuYWdlLWV2ZW50cy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