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

class FlutVisibility {
  FlutVisibility._();

  static Visibility? flutDecode(
    FlutRuntime runtime,
    Map<String, dynamic> data,
  ) {
    return Visibility(
      key: runtime.decodeKey(data),
      visible: runtime.unpackRequiredField<bool>(data, 'visible'),
      child: runtime.unpackRequiredField<Widget>(data, 'child'),
    );
  }
}
