rift 1.0.1 copy "rift: ^1.0.1" to clipboard
rift: ^1.0.1 copied to clipboard

Rift — The next-generation NoSQL database for Flutter & Dart. Pure Dart, blazing fast, reactive queries, and zero native dependencies.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:rift_flutter/rift_flutter.dart';
import 'home_page.dart';
import 'systems/theme_system.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Rift.initFlutter('rift_demo');

  // Load theme preferences
  await ThemeSystem().loadThemePreference();

  runApp(const RiftDemoApp());
}

class RiftDemoApp extends StatefulWidget {
  const RiftDemoApp({super.key});

  static void toggleTheme(BuildContext context) {
    context.findAncestorStateOfType<RiftDemoAppState>()?.toggleTheme();
  }

  @override
  State<RiftDemoApp> createState() => RiftDemoAppState();
}

class RiftDemoAppState extends State<RiftDemoApp> {
  final ThemeSystem _themeSystem = ThemeSystem();

  void toggleTheme() {
    setState(() {
      _themeSystem.toggleTheme();
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Rift Database',
      debugShowCheckedModeBanner: false,
      themeMode: _themeSystem.currentMode,
      theme: _themeSystem.getLightTheme(),
      darkTheme: _themeSystem.getDarkTheme(),
      home: const HomePage(),
    );
  }
}
1
likes
135
points
124
downloads

Documentation

API reference

Publisher

verified publisheridris-ghamid.linkpc.net

Weekly Downloads

Rift — The next-generation NoSQL database for Flutter & Dart. Pure Dart, blazing fast, reactive queries, and zero native dependencies.

Topics

#database #nosql #storage #flutter #reactive

License

Apache-2.0, BSD-3-Clause (license)

Dependencies

crypto, isolate_channel, json_annotation, meta, web

More

Packages that depend on rift