json_to_widget 0.0.2 copy "json_to_widget: ^0.0.2" to clipboard
json_to_widget: ^0.0.2 copied to clipboard

retractedoutdated

Payload A flutter plugin to use convert Json to widget

example/lib/main.dart

import 'dart:convert';

import 'package:flutter/cupertino.dart';
import 'package:json_to_widget/json_to_widget.dart';

void main() {
  runApp(HomePage());
}

class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  String form = json.encode({
    'fields': [
      {
        'key': 'input1',
        'type': 'Input',
        'label': 'Username',
        'placeholder': "Enter Your Username",
        'required': true
      },
      {
        'key': 'password1',
        'type': 'Password',
        'label': 'Password',
        'required': true
      },
    ]
  });

  dynamic response;

  @override
  Widget build(BuildContext context) {
    return Container(
      child: JsonWidget(
          form: form,
          onChanged: (dynamic response) {
            this.response = response;
          }),
    );
  }
}
2
likes
0
pub points
49%
popularity

Publisher

unverified uploader

Payload A flutter plugin to use convert Json to widget

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on json_to_widget