lainisha 2024.9.0 copy "lainisha: ^2024.9.0" to clipboard
lainisha: ^2024.9.0 copied to clipboard

A Cross-Platform, Open-Source Admin Framework for Flutter

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:lainisha/lainisha.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) {
    final restDataProvider =
        RestDataProvider('https://jsonplaceholder.typicode.com');

    return LainishaAdmin(
      title: 'Lainisha Admin Portal',
      dataProvider: restDataProvider,
      resources: [
        Resource(name: 'users'),
        Resource(name: 'posts'),
        Resource(
          name: 'users',
          list: (context) => const Center(child: Text('Users List')),
          create: (context) => const Center(child: Text('Create User')),
          edit: (context, data) =>
              Center(child: Text('Edit User: ${data['name']}')),
        ),
        Resource(
          name: 'posts',
          list: (context) => const Center(child: Text('Posts List')),
        ),
      ],
    );
  }
}
0
likes
130
points
46
downloads

Publisher

verified publisherkevinomyonga.com

Weekly Downloads

A Cross-Platform, Open-Source Admin Framework for Flutter

Repository (GitHub)
View/report issues
Contributing

Topics

#admin #framework

Documentation

API reference

Funding

Consider supporting this project:

www.buymeacoffee.com

License

MIT (license)

Dependencies

adaptive_chameleon_theme, cached_network_image, csv, dio, flutter, get_it, go_router, open_filex, path_provider, pdf, shared_preferences

More

Packages that depend on lainisha