Core layer of flutter projects.

Overview

Core layer usable in every Flutter project.

Features

  • Results: It usable for return operation result, message and/or data.
  • DisplayMessages: Use them for display mesage with SnackBar or AlertDialog.

Getting started

For import that library, open pubspec.yaml document on your project root and add theese commands below to the dependencies

guki_core:
    git:
        url: https://github.com/E-MRE/guki_core
        ref: #choose a tag you want to use

Usage

Include short and useful examples for package users. Add longer examples to /example folder.

v0.0.2:

DisplaySnackBar(context).errorMessage('Error message here');
 DisplayAlertDialog(context).successAlert('Message is success');

v0.0.1:

DataResult<int> addOneIfNotNull(int? value) {
    return value != null
        ? SuccessDataResult(data: value + 1)
        : ErrorDataResult(message: 'value is null');
  }
You might also like...

just a flutter project called working_project that projects the project on the working.

just a flutter project called working_project that projects the project on the working.

Flutter & Firebase Realtime Apps This is a Shipper app that can be used as a shipper hooker using Flutter & Firebase. Go drawsql.app/c-5/diagrams/work

Jan 1, 2022

This is a flutter app which uses the Bitrise Api(https://api-docs.bitrise.io/) to show the bitrise projects and builds and lets you download your artifacts.

This is a flutter app which uses the Bitrise Api(https://api-docs.bitrise.io/) to show the bitrise projects and builds and lets you download your artifacts.

Bitrise Artifact Downloader Introduction 🙋‍♂️ This is a flutter app which uses the Bitrise Api(https://api-docs.bitrise.io/) to show the bitrise proj

Apr 30, 2021

A basic login/register screen that can be used as a template for future Flutter projects.

A basic login/register screen that can be used as a template for future Flutter projects.

A Flutter / Firebase login screen A simple flutter/dart based login-screen that connects with Firebase Auth to enable users to sign-in/up with Email o

Dec 20, 2022

Import & use javascript libraries in your flutter web projects

Import & use javascript libraries in your flutter web projects

Import JS Library Import & use javascript libraries in your flutter web projects. flutter: assets: - assets/howler.js importJsLibrary(url: "./as

Oct 1, 2022

This is a set of small projects focused solely on the development of the graphical interface with Flutter

This is a set of small projects focused solely on the development of the graphical interface with Flutter

My Flutter Projects Flutter apps with cool design and animations Social Media Youtube Facebook Twitter Getting Started This project is a starting poin

Dec 19, 2022

A template for flutter projects with CRUD

A template for flutter projects with CRUD

Flutter boilerplate Flutter Boilerplate Project Fork this project then start you

Nov 24, 2022

The definitive landscape virtual keyboard for flutter projects that can't support regular virtual keyboards

The definitive landscape virtual keyboard for flutter projects that can't support regular virtual keyboards

VK Flutter Virtual Keyboard The definitive landscape virtual keyboard for flutte

Dec 13, 2022

An opinionated, community-driven set of lint rules for Dart and Flutter projects. Like pedantic but stricter

An opinionated, community-driven set of lint rules for Dart and Flutter projects. Like pedantic but stricter

Lint for Dart/Flutter lint is a hand-picked, open-source, community-driven collection of lint rules for Dart and Flutter projects. The set of rules fo

Jan 3, 2023

Flutter architecture you can use in your projects.

Flutter Architecture Projelerinizde kullanabileceğiniz flutter mimarisi. [ Update: 05.01.2022 ] "lib" klasörünü projenizin lib klasörü ile değiştirere

Oct 2, 2022
Comments
  • LocaleCachingService created using by Hive.

    LocaleCachingService created using by Hive.

    HiveCachingManager created.

    Future<void> examples() async {
        var isSaved = await _cachingService.setValue<String>('Test', 'My data');
        print(isSaved.toString());
    
        var myDataCache =
            await _cachingService.getValue<String>('Test', defaultValue: '');
        var myDataHive =
            await _hiveService.getValue<String>('Test', defaultValue: '');
    
        print(myDataCache?.toString() ?? 'error cache');
        print(myDataHive?.toString() ?? 'error hive');
    
        var isOpen = _hiveService.isBoxOpen('Test');
        if (isOpen) {
          await _hiveService.close<String>('Test');
        }
    
        var isDeleted = await _cachingService.deleteValue('Test');
        print('Is Deleted: $isDeleted');
      }
    
    opened by E-MRE 0
  • RemoteDataService & HttpRemoteDataManager created.

    RemoteDataService & HttpRemoteDataManager created.

    • RemoteDataService created for API requests.

      • HttpRemoteDataManager created.
      • ApiResponse & ApiResponseModel created. Users can parse their json using ApiResponse.
      • EntityModel created for parse json to model simply.
      • Also JsonConverter created for parse json.
      • HttpStatusCodeController created. It returns Result with message.
      • Exceptions created like ConnectionException, ServerException or SocketException
      • ApiConstants created. It includes url's and messages.
    • DurationTypes enum created. It includes some Durations.

    • Sizes enum created. It returns some double values.

    opened by E-MRE 0
  • SnackBar & AlertDialog displayers created.

    SnackBar & AlertDialog displayers created.

    Display messages with SnackBar or AlertDialog.

    Example usages:

    DisplaySnackBar(context).errorMessage('Error message here');

    DisplayAlertDialog(context).successAlert('Message is success');

    opened by E-MRE 0
  • Package Utilities Plan

    Package Utilities Plan

    • [x] Results
    • [x] Display Messages
    • [x] Json Convert to Model
    • [x] Custom Exceptions with enums
    • [x] Http Remote Data Manager
    • [ ] Dio Remote Data Manager
    • [x] Hive Locale Data Manager
    • [ ] Firebase Manager
    • [ ] Aes Crypt
    • [ ] Temporary File Opener
    • [ ] Loading Dialog
    • [ ] CircularBorderRadius class
    • [ ] RoundedBorder class
    • [ ] Validation Runner
    • [ ] Date Formatter
    • [ ] Device Id Getter
    • [ ] PagePadding
    • [x] Custom Sizes enum
    • [ ] EmptySpace class
    • [x] Custom Duration enum
    • [ ] Video Service
    • [ ] Camera Service
    • [ ] QR Service
    opened by E-MRE 0
Releases(0.0.4)
  • 0.0.4(Jan 15, 2022)

    Use HiveCachingManager for save data to the cache.

    ##Example:

     // HiveCachingManager implements HiveService.
      // HiveService implements LocaleCachingService
      // Which mean you can use hive spesific functions or locale caching functions
    
      ///[_cachingService] can use  only [LocaleCachingService] methods.
      final LocaleCachingService _cachingService = HiveCachingManager.instance;
    
      ///[_hiveService] can use [LocaleCachingService] methods and [HiveService] spesific methods.
      final HiveService _hiveService = HiveCachingManager.instance;
    
    Future<void> examples() async {
        var isSaved = await _cachingService.setValue<String>('Test', 'My data');
        print(isSaved.toString());
    
        var myDataCache =
            await _cachingService.getValue<String>('Test', defaultValue: '');
        var myDataHive =
            await _hiveService.getValue<String>('Test', defaultValue: '');
    
        print(myDataCache?.toString() ?? 'error cache');
        print(myDataHive?.toString() ?? 'error hive');
    
        var isOpen = _hiveService.isBoxOpen('Test');
        if (isOpen) {
          await _hiveService.close<String>('Test');
        }
    
        var isDeleted = await _cachingService.deleteValue('Test');
        print('Is Deleted: $isDeleted');
      }
    
    Source code(tar.gz)
    Source code(zip)
  • 0.0.3(Jan 14, 2022)

    • RemoteDataService created for API requests.

      • HttpRemoteDataManager created.
      • ApiResponse & ApiResponseModel created. Users can parse their json using ApiResponse.
      • EntityModel created for parse json to model simply.
      • Also JsonConverter created for parse json.
      • HttpStatusCodeController created. It returns Result with message.
      • Exceptions created like ConnectionException, ServerException or SocketException
      • ApiConstants created. It includes url's and messages.
    • DurationTypes enum created. It includes some Durations.

    • Sizes enum created. It returns some double values.

    Example Usage:

    • Define HttpRemoteManager
    final _remoteService = HttpRemoteDataManager.getInstance(
        baseUrl: 'https://jsonplaceholder.typicode.com/',
        timeout: DurationTypes.thirtytwoSeconds,
        header: {'Content-type': 'application/json'},
      )
        ..addBearerTokenToHeader('ADD_YOUR_TOKEN')
        ..setTimeout(DurationTypes.sixteenSeconds)
        ..setHeader({'CUSTOM_HEADER': 'SET_EASILY'});
    
    • Get Data
    Future<void> getData(int id) async {
        //TReturn means: this method will return for example Todo class.
        //TModel means: Parse response data like TModel type for example Todo class.
        var result = await _remoteService.getData<Todo, Todo>(
          endpoint: 'todos/$id',
          parseModel: Todo(),
        );
    
        //End this methods request with http and convert response json like Todo class.
        // If all operations succes it returns [SuccessDataResult] and data type Todo.
    
        if (result.success) {
          print(result.data?.title);
          print(result.toJson());
        } else {
          print(result.message);
        }
      }
    
    Future<void> getAllTodosByApiResponse(int id) async {
        //That operation gets Todo list inside of [ApiResponseModel]
        var result = await _remoteService.getDataByApiResponse<List<Todo>, Todo>(
          endpoint: 'todos/$id',
          parseModel: Todo(),
          apiResponse: MyApiResponseModel(),
        );
    
        if (result.statusCode == 0 && result.success == true) {
          result.data?.map((item) => print(item.title));
          print(result.toJson());
        } else {
          print(result.message);
        }
      }
    
    • Post Data
    Future<void> postData(Todo todo) async {
        //That operation send data using [POST] method and returns [Todo] class
        var result = await _remoteService.postByData<Todo, Todo>(
          endpoint: '/posts',
          body: todo,
          parseModel: Todo(),
          isJsonEncode: true,
        );
    
        if (result.success) {
          print(result.toJson());
        } else {
          print(result.message);
        }
      }
    
      Future<void> postDataByApiResponse(Todo todo) async {
        //That operation send data using [POST] method and returns [ApiResponse] extended class
        var result = await _remoteService.postByResponseData<Todo, Todo>(
          endpoint: '/posts',
          body: todo,
          parseModel: Todo(),
          isJsonEncode: true,
          apiResponse: MyApiResponseModel(),
        );
    
        if ((result.success ?? false) && (result.statusCode ?? -1) == 0) {
          print(result.toJson());
        } else {
          print(result.message);
        }
      }
    }
    
    • Create Entity class and implement with EntityModel
    // implement EntityModel to your class if you want to parse automatically.
    class Todo implements EntityModel<Todo> {
      int? userId;
      int? id;
      bool completed;
      String? title;
      String? body;
    
      Todo({
        this.userId,
        this.id,
        this.completed = false,
        this.title,
        this.body,
      });
    
      factory Todo.fromJson(Map<String, dynamic> json) {
        return Todo(
          userId: json['userId'],
          id: json['id'],
          title: json['title'],
          body: json['body'],
          completed: json['completed'],
        );
      }
    
      @override
      Todo fromJson(Map<String, dynamic> json) => Todo.fromJson(json);
    
      @override
      Map<String, dynamic>? toJson() {
        return {
          'userId': userId,
          'id': id,
          'title': title,
          'body': body,
        };
      }
    }
    
    • Customize ApiResponseModel if you need.
    // You can create your ApiResponseModel and use it.
    class MyApiResponseModel<TData, TParse> implements ApiResponse<TData, TParse> {
      @override
      TData? data;
    
      @override
      String? message;
    
      @override
      TParse? parseModel;
    
      @override
      int? statusCode;
    
      @override
      bool? success;
    
      String? statusMessage;
      String? json;
    
      MyApiResponseModel({
        this.data,
        this.message,
        this.parseModel,
        this.statusCode,
        this.success,
        this.json,
        this.statusMessage,
      });
    
      @override
      ApiResponse fromJson(Map<String, dynamic> json, {TParse? parseModel}) {
        //TODO: parse your json data
        return ApiResponseModel();
      }
    
      @override
      Map<String, dynamic> toJson() {
        // TODO: implement toJson
        return {};
      }
    }
    
    Source code(tar.gz)
    Source code(zip)
  • 0.0.2(Jan 6, 2022)

    You can display your messages using DisplaySnackBar class or DisplayAlertDialog class.

    Theese classes have two methods. One of them success message and other one is error message.

    Source code(tar.gz)
    Source code(zip)
  • 0.0.1(Jan 6, 2022)

    You can use results for return data with message and succes information.

    • Example Usage:

    DataResult<int> addOneIfNotNull(int? value) { return value != null ? SuccessDataResult(data: value + 1) : ErrorDataResult(message: 'value is null'); }

    Source code(tar.gz)
    Source code(zip)
Owner
Emre
A picture is worth thousand words. (And so it takes a thousand times longer to upload!)
Emre
FFloat, although simple and easy to use, can satisfy all your imagination of the floating layer.

ffloat FFloat, although simple and easy to use, can satisfy all your imagination of the floating layer. Born and elegant, supporting precise position

Fliggy Mobile 221 Oct 25, 2022
Chat-app-server - Backend layer that exposes some APIs

A server app built using Shelf, configured to enable running with Docker. This sample code handles HTTP GET requests to / and /echo/<message> Running

Andrea Bozzelli 0 Jan 7, 2022
It's OK to love Flutter and hate hand-coding design elements. Parabeac-Core converts design files into Flutter code.

Parabeac-Core Parabeac-Core converts design files into Flutter code driven by open-source & community. Contribute · Discord Community · Designer Proto

Parabeac 536 Jan 4, 2023
Todo app codelab - A simple UI for todo app to showcase Flutter features and core concepts

Codelab Todo App A simple todo app UI for to showcase Flutter and Dart core conc

Junior Medehou 3 May 12, 2022
dartevel core framework

dartevel-framework dartevel core framework start project: 2021-08-23 - ۱۴۰۰/۰۶/۰۱ Getting Started Install Dart. Activate Dartevel pub global activate

Dartevel Framework 10 Dec 24, 2022
At its core, Mah-Event lets end-users initiate and find events corresponding to their interests and location

Mah-Event Application At its core, Mah-Event lets end-users initiate and find events corresponding to their interests and location. It allows people t

Palm Jumnongrat 4 Oct 23, 2022
Flutter-course - Projects of the course to learn Flutter!

?? Flutter Course Projects of the course to learn Flutter! ?? What is it? Repo with all projects made during the Flutter Course provided by Daniel Cio

Alícia Foureaux 1 Jan 3, 2022
All projects from my Flutter Animations Course

Flutter Animations Course | Code With Andrea This repo contains all the projects from my Flutter Animations Course. The main project for this course i

Andrea Bizzotto 193 Dec 30, 2022
Flutter Projects

i_am_poor My 1st Flutter Project without any Guidance This project is a Hello World project based on the Apple App Store app called "I am Rich" (see h

DocMarcial Name 1 Oct 26, 2021