import 'package:flutter/material.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';

class Utilities {
  static PlatformTextButton buildButton(
      {required BuildContext context,
        required String label,
        required String routeName}) {
    return PlatformTextButton(
        onPressed: () => Navigator.pushNamed(context, routeName),
        child: Text(label));
  }

  static PlatformTextButton buildIconButton(
      {required BuildContext context,
        required String label,
        required Icon icon,
        required String routeName}) {
    return PlatformTextButton(
        onPressed: () => Navigator.pushNamed(context, routeName),
        child: Row(children: [icon, Text(label)]));
  }
}
