functions/helpers library
empathetech_flutter_ui Copyright (c) 2023 Empathetech LLC. All rights reserved. See LICENSE for distribution and usage details.
Functions
-
closeKeyboard(
BuildContext context) → void - More readable than FocusScope.of(context).unfocus();
-
copyToClipboard(
{required String string}) → Future< bool?> -
Copy
string
to ClipboardData and show aFluttertoast
for the user -
doNothing(
) → void - Do you have a void Function as a parameter that you want to be optional? Then do nothing!
-
heightOf(
BuildContext context) → double - More readable than MediaQuery.of(context).size.height
-
isAsset(
String? path) → bool -
Returns whether the passed
path
refers to one of the stored EzConfig.assets -
measureText(
{required String text, required double scalar, required TextStyle? style}) → Size -
Returns the soon-to-be rendered size of text via a TextPainter
scalar
should be the value from MediaQuery.of(context).textScaleFactor -
setPageTitle(
{required BuildContext context, required String title, int? primaryColor}) → void - For web use, set the tab's title
-
widthOf(
BuildContext context) → double - More readable than MediaQuery.of(context).size.width