A template folder for common widgets and useful scripts

Overview

Useful-Templates

A template folder for common widgets and useful scripts

Co-author: PratikJH153

  1. REST API Dart Code: A ready to use repository containing code for calling GET, POST, DELETE and PATCH methods using the Dio package.

Working:
a. database.dart: The file is where you specify the endpoint of your application. It contains variables for toggling between Debug mode and production as well as custom messages made for various errors.

. In case of call failure "unpacked" will return a message corresponding to the type of error and the response data otherwise ie. in case of a successful request.">
unpackLocally: A function that takes in response body of a REST API call and returns a map containing two parameters: 
"success": 0/1 (0 for failure 1 for successful result) and 
"unpacked": . 

In case of call failure "unpacked" will return a message corresponding to the type of error 
and the response data otherwise ie. in case of a successful request.

b. rest_apis.dart: The file containing the REQUEST function responsible for handling an asynchronous API call.

 Returns a Map containing local_result and local_status parameters.
 local_status: 200 If the server responds 500 in case of a Timeout

c. apis.dart: A file containing all APIs you will be using throughout the project. These functions need to be custom made according to the project and yet follow a simple pattern.

 Parameters: In case a request url consists of a parameter 
 eg: endpoint/folder/innerfolder/$unique_variable, 
 
 A single parameter can be used and passed along the request.
 
 Eg: 
 static Future getProductData(String id) async {
    if (kDebugMode) {
      print("CALLING getProductData(String id)");
    }
    String endpoint = "users/products/getProductData/$id";
    return GET(endpoint);
  }

  Similarly, String id can be replaced by Map? body for requests requiring a Request Body
You might also like...

Flutter widgets and themes implementing the current macOS design language.

Flutter widgets and themes implementing the current macOS design language.

macos_ui Flutter widgets and themes implementing the current macOS design language. NOTE: This package depends on the excellent native_context_menu pl

Jan 7, 2023

This repo is for anything that can be reusable in flutter like custom widgets 🟥, animations 🌟and more

Flutter Shortcuts This repo is for anything that can be reusable in flutter like custom widgets 🟥 , animations 🌟 and more. How to Use Just get the f

Dec 3, 2022

An extensive snap tool/widget for Flutter that allows very flexible snap management and snapping between your widgets.

An extensive snap tool/widget for Flutter that allows very flexible snap management and snapping between your widgets.

Dec 16, 2022

Displays a scrollable timeline with custom child widgets and custom icons.

Displays a scrollable timeline with custom child widgets and custom icons.

Flutter Timeline Widget Displays a scrollable timeline with custom child widgets and custom icons. Installation In your pubspec.yaml file within your

Nov 20, 2022

A flutter package which provides most commonly used widgets with their normal and neon version

A flutter package which provides most commonly used widgets with their normal and neon version

This is a flutter package which provides most commonly used widgets with their normal and neon version. There are multiple different types of widgets under this package, which can be used to create more neon theme widget

Oct 7, 2022

A code generator to write widgets as function without loosing the benefits of classes.

Widgets are cool. But classes are quite verbose: class Foo extends StatelessWidget { final int value; final int value2; const Foo({Key key, thi

Dec 29, 2022

Code generation for Flutter Padding widgets based on your constants

Code generation for Flutter Padding widgets based on your constants

Oct 20, 2022

A provider that passes EventBus down to all the widgets.

A provider that passes EventBus down to all the widgets.

Jul 9, 2022

Animate SliverAppBar's widgets when scrolling

Animate SliverAppBar's widgets when scrolling

Animate SliverAppBar's widgets when scrolling

Oct 2, 2022
Owner
Atharv Karbhari
Full Stack Mobile Application Developer || Competitive Coder
Atharv Karbhari
A new flutter package for collection of common popular social media widgets

Social Media Widgets - package A new flutter package for collection of common popular social media widgets Currently available widgets Snapchat screen

theboringdeveloper 34 Nov 12, 2022
Here you will get basic implementation of all useful and top widgets in flutter.

Top Widgets in Flutter This is a common repo where you can get most frequest used widgets in flutter. Samples Getting Started This project is a starti

Sakhawat Hossain 5 Nov 3, 2022
Flutter debug helper widget with common and custom actions

Flutter debug helper widget with common and custom actions

Stanislav Ilin 43 Dec 7, 2022
A flutter package for displaying common picker dialogs.

Flutter Material Pickers A flutter package containing commonly used material design picker dialogs. Some are new, some wrap existing or built in picke

CodeGrue 89 Jan 2, 2023
A Flutter library to add the Common effect (line, bubble, dot ...) of tab indicator.

flutter_tab_indicator A Flutter library to add the Common effect (line, bubble, dot ...) of tab indicator. Showcases Installation Showcases Showcases

CrabMan 14 Jun 19, 2022
Custom widgets and utils using Flutter framework widgets and Dart language

reuse_widgets_and_utils The custom widgets and utils using Flutter framework widgets and Dart programming language. Getting Started This project is a

null 1 Oct 29, 2021
Flutter package: Assorted layout widgets that boldly go where no native Flutter widgets have gone before.

assorted_layout_widgets I will slowly but surely add interesting widgets, classes and methods to this package. Despite the package name, they are not

Marcelo Glasberg 122 Dec 22, 2022
Widgets beginner - Widgets beginner with flutter

Widgets beginner - Widgets beginner with flutter

Tukhtamurodov Sardorbek 2 Feb 6, 2022
Custom Flutter widgets that makes Checkbox and Radio Buttons much cleaner and easier.

custom_radio_grouped_button Custom Radio Buttons and Grouped Check Box Button Custom Flutter widgets that makes Checkbox and Radio Buttons much cleane

Ketan Choyal 144 Sep 23, 2022
React hooks for Flutter. Hooks are a new kind of object that manages a Widget life-cycles. They are used to increase code sharing between widgets and as a complete replacement for StatefulWidget.

English | Português Flutter Hooks A Flutter implementation of React hooks: https://medium.com/@dan_abramov/making-sense-of-react-hooks-fdbde8803889 Ho

Remi Rousselet 2.6k Dec 29, 2022