ez_function 0.1.0
ez_function: ^0.1.0 copied to clipboard
This plugin contains basic methods that you often use in any project. The goal is to help you easily access the necessary methods without having to redefine them. The plugin supports methods such as c [...]
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:ez_function/ez_function.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: const Center(
child: Text('Follow methods in the bellow this widget'),
),
),
);
}
_useCommonUtils() {
CommonUtils.showToast("Show Toast");
}
_useLogUtils() {
LogUtils.log("This is my log");
}
_useConvertUtils() {
String stringNumber = ConvertUtils.getString(123);
LogUtils.info(message: stringNumber);
}
_useValidateUtils() {
ValidateUtils().isEmailValid("test@gmail.com");
}
}