zipy_flutter 0.0.7
zipy_flutter: ^0.0.7 copied to clipboard
Release of the zipy_flutter package, compatible with both iOS and Android.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:zipy_flutter/zipy_flutter.dart';
import 'package:zipy_flutter_example/screens/login_screen.dart';
import 'screens/home_screen.dart';
import 'screens/api_call_screen.dart';
import 'screens/misc_screen_1.dart';
import 'screens/misc_screen_2.dart';
import 'screens/misc_screen_3.dart';
import 'screens/error_simulation_screen.dart';
import 'screens/anr_crash_screen.dart';
import 'errors/error_screen.dart';
import 'api/graphql_api.dart'; // Import the file where `setupGraphQLClient` is defined
void main() {
WidgetsFlutterBinding.ensureInitialized();
setupGraphQLClient();
Zipy.init(key: 'YOUR_API_KEY');
runApp(const ZipyWrapper(child: MyApp()));
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Custom Flutter App',
theme: ThemeData(primarySwatch: Colors.blue),
navigatorObservers: [ZipyNavigationObserver()],
initialRoute: '/login',
routes: {
'/login': (context) => const LoginScreen(),
'/home': (context) => const HomeScreen(),
'/api-calls': (context) => const ApiCallScreen(),
'/misc-1': (context) => const MiscScreen1(),
'/misc-2': (context) => const MiscScreen2(),
'/misc-3': (context) => const MiscScreen3(),
'/error-simulation': (context) => const ErrorSimulationScreen(),
'/anr-crash': (context) => const AnrCrashScreen(),
'/zipy-logs': (context) => const ErrorScreen(),
},
);
}
}