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

class FlutFloatingActionButton {
  FlutFloatingActionButton._();

  static Widget? flutDecode(FlutRuntime runtime, Map<String, dynamic> data) {
    return FloatingActionButton(
      key: runtime.decodeKey(data),
      tooltip: runtime.unpackOptionalField<String>(data, 'tooltip'),
      onPressed: runtime.unpackNullableRequiredCallback(data, 'onPressedId'),
      child: runtime.unpackOptionalField<Widget>(data, 'child'),
    );
  }
}
