playx 0.0.7 copy "playx: ^0.0.7" to clipboard
playx: ^0.0.7 copied to clipboard

playx project

example/lib/main.dart

import 'package:example/config.dart';
import 'package:flutter/material.dart';
import 'package:playx/playx.dart';

void main() async {
  final config = AppConfig();
  Playx.runPlayx(appConfig: config, app: const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return PlayXThemeBuilder(
      builder: (xTheme) {
        return MaterialApp(
          title: 'Flutter Demo',
          theme: xTheme.theme,
          home: Scaffold(
            appBar: AppBar(
              title: const Text('Playx Example'),
            ),
            body: Center(
              child: Text(AppTheme.xTheme.nameBuilder()),
            ),
            floatingActionButton: const FloatingActionButton(
              onPressed: AppTheme.next,
              tooltip: 'Increment',
              child: Icon(Icons.add),
            ),
          ),
        );
      },
    );
  }
}