import 'package:flutter/material.dart';
import 'package:flut/flut/runtime.dart';

class FlutSingleChildScrollView {
  FlutSingleChildScrollView._();

  static SingleChildScrollView? flutDecode(
    FlutRuntime runtime,
    Map<String, dynamic> data,
  ) {
    return SingleChildScrollView(
      key: runtime.decodeKey(data),
      scrollDirection: runtime.unpackRequiredField<Axis>(
        data,
        'scrollDirection',
      ),
      controller: runtime.unpackOptionalField<ScrollController>(
        data,
        'controller',
      ),
      padding: runtime.unpackOptionalField<EdgeInsets>(data, 'padding'),
      child: runtime.unpackOptionalField<Widget>(data, 'child'),
    );
  }
}
