json2ui 1.0.0 copy "json2ui: ^1.0.0" to clipboard
json2ui: ^1.0.0 copied to clipboard

A powerful Flutter package for dynamically generating responsive, themed, and animated UI components from JSON configurations. Features include property validation, custom widget builders, responsive [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:json2ui/json2ui.dart';
import 'screens/home_screen.dart';
import 'screens/basic_widgets_screen.dart';
import 'screens/responsive_design_screen.dart';
import 'screens/custom_widgets_screen.dart';
import 'screens/theming_screen.dart';
import 'screens/property_processing_screen.dart';
import 'screens/animation_screen.dart';
import 'screens/interactive_demo_screen.dart';

void main() {
  // Initialize json2ui with built-in widget builders
  initializeJson2UI();
  runApp(const Json2UIExampleApp());
}

class Json2UIExampleApp extends StatelessWidget {
  const Json2UIExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Json2UI - Complete Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        useMaterial3: true,
        brightness: Brightness.light,
      ),
      darkTheme: ThemeData(
        primarySwatch: Colors.blue,
        useMaterial3: true,
        brightness: Brightness.dark,
      ),
      themeMode: ThemeMode.system,
      initialRoute: '/',
      routes: {
        '/': (context) => const HomeScreen(),
        '/basic-widgets': (context) => const BasicWidgetsScreen(),
        '/responsive-design': (context) => const ResponsiveDesignScreen(),
        '/custom-widgets': (context) => const CustomWidgetsScreen(),
        '/theming': (context) => const ThemingScreen(),
        '/property-processing': (context) => const PropertyProcessingScreen(),
        '/animation': (context) => const AnimationScreen(),
        '/interactive-demo': (context) => const InteractiveDemoScreen(),
      },
    );
  }
}
1
likes
140
points
91
downloads

Publisher

unverified uploader

Weekly Downloads

A powerful Flutter package for dynamically generating responsive, themed, and animated UI components from JSON configurations. Features include property validation, custom widget builders, responsive breakpoints, and comprehensive theming support.

Repository (GitHub)
View/report issues

Topics

#ui #json #widget #responsive #theming

Documentation

Documentation
API reference

Funding

Consider supporting this project:

github.com

License

BSD-3-Clause (license)

Dependencies

flutter, lottie

More

Packages that depend on json2ui