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

class FlutIcon {
  FlutIcon._();

  static Icon? flutDecode(FlutRuntime runtime, Map<String, dynamic> data) {
    return Icon(
      runtime.unpackOptionalField<IconData>(data, 'icon'),
      key: runtime.decodeKey(data),
      color: runtime.unpackOptionalField<Color>(data, 'color'),
      size: runtime.unpackOptionalField<double>(data, 'size'),
    );
  }
}
