demoflu 2.4.0 copy "demoflu: ^2.4.0" to clipboard
demoflu: ^2.4.0 copied to clipboard

Simplify package demonstration with a versatile web application for showcasing widget usage.

example/lib/main.dart

import 'package:demoflu/demoflu.dart';
import 'package:flutter/material.dart';

void main() {
  DemoFluApp app = DemoFluApp(title: 'Example', rootMenus: _rootMenus);
  app.run();
}

List<DemoMenuItem> _rootMenus = [DemoMenuItem('My page', page: () => MyPage())];

class MyPage extends DemoFluPage {
  final ValueNotifier<int> _count = ValueNotifier(0);

  @override
  PageSections buildSections(BuildContext context) {
    PageSections sections = PageSections();
    sections.text(text: 'Hello');
    sections.widget((context) => ElevatedButton(
        onPressed: () => _count.value++, child: const Text('Increment')));
    sections.widget((context) => Text('Count: ${_count.value}'),
        listenable: _count);
    return sections;
  }
}
9
likes
160
pub points
0%
popularity
screenshot

Publisher

verified publishercaduandrade.net

Simplify package demonstration with a versatile web application for showcasing widget usage.

Repository (GitHub)
View/report issues

Topics

#ui #demo #widget #package

Documentation

API reference

License

MIT (license)

Dependencies

flex_color_picker, flutter, meta, syntax_highlight, url_launcher

More

Packages that depend on demoflu