tecfy_basic_package 1.2.13 copy "tecfy_basic_package: ^1.2.13" to clipboard
tecfy_basic_package: ^1.2.13 copied to clipboard

Package includes all components and services used on most applications.

tecfy_basic_package #

Tecfy Core For Mobile Client Projects

This package for internal use, you're free to use it at your own risk! #

Supporting Platform: #

  • Android
  • iOS
  • Windows
  • Web

Interfaces/ abstract class: #

  • Base Controller
  • Base Model

Services: #

  • API Service
  • Config Server
  • ImageService
  • Notification Service
  • Theme Service

Componenet: #

  • Button with loading animation
  • Checkbox
  • Multi-Select Dropdown
  • Network Image
  • Search Box
  • Text Feild
  • Text Label

to user MVC with TecfyController You need to apply the following in the main.dart #

import 'package:lifecycle/lifecycle.dart';

return MaterialApp(
    navigatorObservers: [defaultLifecycleObserver],
);

the steps to use MVC for each module #

  • create controller extend TecfyController
  • create model extends BaseModel
  • use TecfyStatefulWidget<Controller> instead of TecfyStatefulWidget
  • use TecfyState<Statfull,Controller> instead of State<Statfull>
  • impelment createController on your state class

Recomended project structure #

  • modules

    • employee

      • widgets
        • employee_cart.widget.dart
      • employee.controller.dart
      • employee.model.dart
      • employee_form.page.dart
      • employee_list.page.dart
      • employee.service.dart
    • department

  • widgets

    • text_filed.widget.dart
  • services

    • navigator.service.dart
    • config.service.dart
    • notification.service.dart
    • init.service.dart

Recomended Naming Convention #

1- The file name shall end with .[TYPE] like config.service.dart

2- The file name shall separate the multi words name by underscore like employee_list.page.dart

3- All file/folders shall be lower case letters

4- The name of service function like addNewOrder() The Controller Function of this service must be onAddNewOrder()