fireblocks_flutter_ncw_sdk 1.0.0 fireblocks_flutter_ncw_sdk: ^1.0.0 copied to clipboard
Fireblocks Flutter NCW SDK
import 'dart:async';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'app/core/storage/shared_prefs.dart';
import 'app/ui/main_page.dart';
import 'firebase_options.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
await SharedPrefs.init();
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
useMaterial3: true,
navigationBarTheme: CustomNavigationBarTheme(context),
),
home: Scaffold(
appBar: AppBar(
// title: const Text('Fireblocks SDK Demo'),
),
body: const Center(
child: MainPage(),
),
),
);
}
}
class CustomNavigationBarTheme extends NavigationBarThemeData {
CustomNavigationBarTheme(BuildContext context)
: super(
labelTextStyle: MaterialStateProperty.resolveWith<TextStyle?>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
return Theme.of(context).textTheme.bodySmall?.copyWith(fontSize: 10.0); // Smaller font size when selected
}
return Theme.of(context).textTheme.bodySmall?.copyWith(fontSize: 10.0); // Smaller font size when not selected
},
),
);
}