pub package popularity likes pub points building style: effective dart Wolfiz Technologies WhatsApp Awesome Flutter Buy Me A Coffee

Languages:

English Urdu

About WolfizUtils

  • Wolfiz Utility package helps to resolve coding issues you may incur, Minimize repetition of typing small things. package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

  • For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

  • WolfizUtils has 3 basic principles. This means that these are the priority for all resources in the library: PRODUCTIVITY, PERFORMANCE AND ORGANIZATION.

    • PERFORMANCE: WolfizUtils is focused on performance and minimum consumption of resources.

    • PRODUCTIVITY: WolfizUtils uses an easy and pleasant syntax.

    • ORGANIZATION: WolfizUtils can easily organizes your widgets and code.

In addition, to further increase your productivity, we have More Packages and the Ads Management Setting

Adding dependency

Add Get to your pubspec.yaml file:

dependencies:
  wolfizutils: 0.0.5

Import get in files that it will be used:

import 'package:wolfizutils/wolfizutils.dart';

WolfizUtils Installation Guide

Please follow the complete guide to use this package.

  • Step 1: Add "ScreenUtil Code" before your MaterialApp.
void main() => runApp(
ScreenUtilInit(
designSize: Size(360, 760),
builder: () => MaterialApp(home: Home()),),);
  • Note: Size(Width, Height) = Size(360, 760), Use size of device on which you want to design
  • Note 2: We prefer to use it with GetX and ScreenUtil Flutter Package. and its example is below.
void main() => runApp(
ScreenUtilInit(
designSize: Size(360, 760),
builder: () => GetMaterialApp(home: Home()),),
);
  • Step 2: Just to call Widget where ever you want to in project, but make sure to import ScreenUtil file if its not working.

Examples

Widgets Example

Some Basic and Simple Widgets Example

MyText

Now You don't need to type Text and its properties again and again just type. "MyText"

 MyText(
text: "HomeView is working",
fontSize: 20,
//Note:  Font size is according to screen util ".sp" but don't need to type ".sp".
fontClr: Colors.black,
fontWeight: FontWeight.normal,
),

PngImageButton

Now You don't need to type Text and its properties again and again just type. "MyText"

PngImageButton(
imagePath: "assets/imgepath.png",
imageWidth: 100,
imageHeight: 100,
//Note width and height are according to screen util.
onTap: () {
//place where you want to Navigate
},
),

SvgImageButton

SvgImageButton(
imagePath: "aassets/imagepath.svg",
imageWidth: 100,
imageHeight: 100,
//Note width and height are according to screen util.
onTap: () {
//place where you want to Navigate
},
),

GradientButton Left to Right

GradientButtonLtR(
onTap: () {
//place where you want to Navigate
},
title: "Button Title",
btnWidth: 200,
btnHeight: 50,
radius: 10,
//Note: all sizes are according to screen util.
leftClr: Colors.black,
rightClr: Colors.blue,
fontClr: Colors.teal,
fontSize: 14,
fontWeight: FontWeight.bold,
shadowClr: Colors.blue,
),

GradientButton Top to Bottom

GradientButtonTtB(
onTap: () {},
title: "Button Title",
btnWidth: 300,
btnHeight: 80,
radius: 20,
leftClr: Colors.blue,
rightClr: Colors.blueGrey,
fontClr: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold,
shadowClr: Colors.blueAccent,
)

Check Internet Connectivity

  • Step # 1: Go to the conttrollers file of that module where you want to check Internet Connectivity, and update the code like below
class HomeController extends GetxController {
  //TODO: Implement HomeController

  @override
  void onInit() {
    super.onInit();
    WolfizUtils().checkInternetConnection();
  }

  @override
  void onReady() {
    super.onReady();
  }
}
  • Step # 2: Go to bindings file of that module and update code like below
class HomeBinding extends Bindings {
  @override
  void dependencies() {
    Get.put<HomeController>( HomeController(),
    );
  }
}
  • Step # 3: Go to views file of that module and you can use code as you want, in below example you can see how we can use it.
  • Note: Don't forget to call .ifNoInternet(), passing child widget is your own choice
class HomeView extends GetView<HomeController> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Check Internet Connectivity'),
        centerTitle: true,
      ),
      body: Center(
        child: MyText(
          text: "Internet Connected",
          fontSize: 20,
          fontClr: Colors.green,
        ).ifNoInternet(
          child: Center(
            child: MyText(
              text: "No Internet",
              fontSize: 20,
              fontClr: Colors.red,
            ),
          ),
        ),
      ),
    );
  }
}
  • Here you go, you are all done now you can check easily any where or any widget.

Breaking changes from 0.0.7

1- Widget types:

BeforeAfter
TextMyText
Custom Gradient ButtonGradientButtonLTR
Custom Gradient ButtonGradientButtonTtB
Customized Svg ButtonSvgImageButton
Customized Png ButtonPngImageButton
Check Internet'

Discussion

Community channels

Wolfiz Technologies has a highly active and helpful community. If you have questions, or would like any assistance regarding the use of this framework, please join our community channels, your question will be answered more quickly, and it will be the most suitable place. This repository is exclusive for opening issues, and requesting resources, but feel free to be part of GetX Community.

| WhatsApp | GitHub | | Get on WhatsApp | GitHub |

Libraries

check_connectivity
wolfiz_variables
wolfizutils