Lightweight Dart Framework Is an Api Restful Framework for Flutter

 Lightweight Dart Framework is an api restful framework for dart and flutter developers.

import 'package:lwdframework/lwd.dart';
import 'package:lwdframework/lwdio.dart';

Future<void> main(List<String> arguments) async {
  final address = '127.0.0.1';
  const port = 4040;
  var router = LWDRouter();
  router.get('/greeting', (LWDRequest request) {
    return LWDResponse.ok('hello world!');
  });

  await LWDIO().server(router, address, port);
}

Installation

download and install Dart. Dart SDK 2.14.0 or higher is required.

$ dart pub add lwdframework

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get): dependencies: lwdframework: ^0.1.0

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add lwdframework

With Flutter:

 $ flutter pub add lwdframework

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  lwdframework: ^0.4.0

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:lwdframework/lwd.dart';
import 'package:lwdframework/lwdio.dart'; 

example/main.dart

import 'package:lwdframework/lwd.dart';
import 'package:lwdframework/lwdio.dart';

Future<void> main(List<String> arguments) async {
  final address = '127.0.0.1';
  const port = 4040;
  var router = LWDRouter();
  router.get('/greeting', (LWDRequest request) {
    return LWDResponse.ok('hello world!');
  });

  await LWDIO().server(router, address, port);
} 

Download Details:

Author: emirg1989

Source Code: https://github.com/emirg1989/LWD-Framework

#flutter #frameworks 

Lightweight Dart Framework Is an Api Restful Framework for Flutter

Simple form Maker For Flutter Framework

FormBuilder Extra Fields

FormBuilder Extra Fields provides common ready-made form input fields for flutter_form_builder package. The package gives you a convenient way of adding common ready-made input fields instead of creating your own FormBuilderField from scratch.

Example

import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:form_builder_extra_fields/form_builder_extra_fields.dart';

...

final _formKey = GlobalKey<FormBuilderState>();
final continents = ['Africa', 'Asia', 'Australia', 'Europe', 'North America', 'South America'];
...


@override
Widget build(BuildContext context) {
  return FormBuilder(
    key: _formKey,
    autovalidate: true,
    child: Column(
      children: <Widget>[
        FormBuilderSearchableDropdown(
          name: 'searchable_dropdown',
          items: continents,
          decoration:
              const InputDecoration(labelText: 'Searchable Dropdown'),
        ),
        const SizedBox(height: 15),
        FormBuilderColorPickerField(
          name: 'color_picker',
          initialValue: Colors.yellow,
          // readOnly: true,
          colorPickerType: ColorPickerType.MaterialPicker,
          decoration: const InputDecoration(labelText: 'Color Picker'),
        ),
        FormBuilderCupertinoDateTimePicker(
          name: 'date_time',
          initialValue: DateTime.now(),
          inputType: CupertinoDateTimePickerInputType.both,
          decoration: const InputDecoration(
            labelText: 'Cupertino DateTime Picker',
          ),
          locale: Locale.fromSubtags(languageCode: 'en_GB'),
        ),
        FormBuilderCupertinoDateTimePicker(
          name: 'date',
          initialValue: DateTime.now(),
          inputType: CupertinoDateTimePickerInputType.date,
          decoration: const InputDecoration(
            labelText: 'Cupertino DateTime Picker - Date Only',
          ),
          locale: Locale.fromSubtags(languageCode: 'en_GB'),
        ),
        FormBuilderCupertinoDateTimePicker(
          name: 'time',
          initialValue: DateTime.now(),
          inputType: CupertinoDateTimePickerInputType.time,
          decoration: const InputDecoration(
            labelText: 'Cupertino DateTime Picker - Time Only',
          ),
          locale: Locale.fromSubtags(languageCode: 'en_GB'),
        ),
        FormBuilderTypeAhead<String>(
          decoration: const InputDecoration(
              labelText: 'TypeAhead (Autocomplete TextField)',
              hintText: 'Start typing continent name'),
          name: 'continent',
          itemBuilder: (context, continent) {
            return ListTile(title: Text(continent));
          },
          suggestionsCallback: (query) {
            if (query.isNotEmpty) {
              var lowercaseQuery = query.toLowerCase();
              return continents.where((continent) {
                return continent.toLowerCase().contains(lowercaseQuery);
              }).toList(growable: false)
                ..sort((a, b) => a
                    .toLowerCase()
                    .indexOf(lowercaseQuery)
                    .compareTo(
                        b.toLowerCase().indexOf(lowercaseQuery)));
            } else {
              return continents;
            }
          },
        ),
        FormBuilderTouchSpin(
          decoration: const InputDecoration(labelText: 'TouchSpin'),
          name: 'touch_spin',
          initialValue: 10,
          step: 1,
          iconSize: 48.0,
          addIcon: const Icon(Icons.arrow_right),
          subtractIcon: const Icon(Icons.arrow_left),
          
        ),
        FormBuilderRating(
          decoration: const InputDecoration(labelText: 'Rating'),
          name: 'rate',
          iconSize: 32.0,
          initialValue: 1.0,
          max: 5.0,
        ),
        FormBuilderSignaturePad(
          decoration: const InputDecoration(
            labelText: 'Signature Pad',
          ),
          name: 'signature',
          border: Border.all(color: Colors.green),
        ),
        const SizedBox(height: 10),
        Row(
          children: <Widget>[
            Expanded(
              child: MaterialButton(
                color: Theme.of(context).colorScheme.secondary,
                child: Text(
                  "Submit",
                  style: TextStyle(color: Colors.white),
                ),
                onPressed: () {
                  _formKey.currentState.save();
                  if (_formKey.currentState.validate()) {
                    print(_formKey.currentState.value);
                  } else {
                    print("validation failed");
                  }
                },
              ),
            ),
            SizedBox(width: 20),
            Expanded(
              child: MaterialButton(
                color: Theme.of(context).colorScheme.secondary,
                child: Text(
                  "Reset",
                  style: TextStyle(color: Colors.white),
                ),
                onPressed: () {
                  _formKey.currentState.reset();
                },
              ),
            ),
          ],
        ),
      ],
    ),
  );
}

Input widgets

The currently supported fields include:

  • FormBuilderChipsInput - Takes a list of Chips as input and suggests more options on typing
  • FormBuilderColorPicker - For Color input selection
  • FormBuilderCupertinoDateTimePicker - For Date, Time and DateTime input using a Cupertino-style picker
  • FormBuilderRating - For selection of a numerical value as a rating
  • FormBuilderSearchableDropdown - Field for selecting value(s) from a searchable list
  • FormBuilderSignaturePad - Field with drawing pad on which user can doodle
  • FormBuilderTouchSpin - Selection of a number by tapping on a plus or minus icon
  • FormBuilderTypeAhead - Auto-completes user input from a list of items

In order to create an input field in the form, along with the label, and any applicable validation, there are several attributes that are supported by all types of inputs namely:

AttributeTypeDefaultRequiredDescription
nameString YesThis will form the key in the form value Map
initialValueTnullNoThe initial value of the input field
enabledbooltrueNoDetermines whether the field widget will accept user input.
decorationInputDecorationInputDecoration()NoDefines the border, labels, icons, and styles used to decorate the field.
validatorFormFieldValidator<T>nullNoA FormFieldValidator that will check the validity of value in the FormField
onChangedValueChanged<T>nullNoThis event function will fire immediately the the field value changes
valueTransformerValueTransformer<T>nullNoFunction that transforms field value before saving to form value. e.g. transform TextField value for numeric field from String to num
The rest of the attributes will be determined by the type of Widget being used.    


 

Support

Issues and PRs

Any kind of support in the form of reporting bugs, answering questions or PRs is always appreciated.

Coffee :-)

If this package was helpful to you in delivering your project or you just wanna to support this package, a cup of coffee would be highly appreciated ;-)

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add form_builder_extra_fields

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  form_builder_extra_fields: ^7.0.0-alpha.6

Alternatively, your editor might support or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:form_builder_extra_fields/form_builder_extra_fields.dart'; 

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:form_builder_validators/form_builder_validators.dart';
import 'home_page.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      localizationsDelegates: [
        FormBuilderLocalizations.delegate,
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
      ],
      supportedLocales: [
        Locale('en', ''),
        Locale('es', ''),
        Locale('fr', ''),
        Locale('ja', ''),
        Locale('pt', ''),
        Locale('sk', ''),
        Locale('pl', ''),
      ],
      home: MyHomePage(),
    );
  }
} 

Download Details:

Author: danvick

Source Code: https://github.com/danvick/flutter_form_builder

#flutter  #frameworks 

 

Simple form Maker For Flutter Framework
Josefa  Corwin

Josefa Corwin

1632085200

How to Use Navigation in Framework7

In this video we will be working with routes and pages to navigate from one page to another

#frameworks 

How to Use Navigation in Framework7
Josefa  Corwin

Josefa Corwin

1632081600

How to Work with Framework7

In this part of the video we work with some of the framework7 components such as Navbar,Buttons, Grid,List,Inputs.

#frameworks 

How to Work with Framework7
Josefa  Corwin

Josefa Corwin

1632078000

instructions on How to Set Up The Application Framework 7

In this part of the series we setup  our framework 7 app and also explain in details about how the app works

#frameworks 

instructions on How to Set Up The Application Framework 7
Josefa  Corwin

Josefa Corwin

1632074400

Full Tutorial on Framework 7 From Beginner to Advanced

This is my first video of framework7 tutorial,In this video we talk about framework7

#frameworks 

Full Tutorial on Framework 7 From Beginner to Advanced
Josefa  Corwin

Josefa Corwin

1632070800

How to Create an android Calculator with Javascript And Framework7 #2

In this video we will build an android calculator with javascript and framework7

#frameworks #javascript #calculator 

 

How to Create an android Calculator with Javascript And Framework7 #2
Josefa  Corwin

Josefa Corwin

1632067200

How to Create an android Calculator with Javascript And Framework7

In this video we will create an android calculator with javascript and framework7

#javascript #calculator #frameworks 

How to Create an android Calculator with Javascript And Framework7
Josefa  Corwin

Josefa Corwin

1632056400

How to Create A To-do List with Javascript and Framework7 Part2

In this video will be build a todolist app with javascript and framework7

#frameworks #javascript 

How to Create A To-do List with Javascript and Framework7 Part2
Josefa  Corwin

Josefa Corwin

1632052800

How to Create A To-do List with Javascript and Framework7

In this video will be build a todolist app with javascript and framework7

#frameworks #javascript 

 

How to Create A To-do List with Javascript and Framework7
Ahebwe  Oscar

Ahebwe Oscar

1631818320

How to Install Django Framework on Debian 11 Easily In 2021

Django is a free and open-source web development framework written in Python. It is used for developing complex and database-driven Python applications. It comes with a set of Python scripts for creating Python projects. It can be run on any operating system that can run Python including, Windows, macOS, Linux/Unix, and Solaris. It helps developers to write less code and create a new website in a short amount of time.

In this tutorial, I will explain how to set up Django in Python virtual environment using the PostgreSQL database on Debian 11. We will then install and configure Nginx as a reverse proxy for Django.

#django #frameworks #debian 

How to Install Django Framework on Debian 11 Easily In 2021
Janis  Smitham

Janis Smitham

1631601900

How To Use Bouncer JS For Form Validation Easily In 15 MInutes

Learn How To Use Bouncer JS For Form Validation Easily In 15 MInutes

It’s called bouncer JS and It’s created by C. Fernandi, you can download it right here
https://github.com/cferdinandi/bouncer

#JavaScript #frameworks 

How To Use Bouncer JS For Form Validation Easily In 15 MInutes
Janis  Smitham

Janis Smitham

1631590680

How To Create A MVC Framework From Scratch For Beginner

Learn How To Create A MVC Framework From Scratch For Beginner

#php #frameworks

How To Create A MVC Framework From Scratch For Beginner
Jon  Gislason

Jon Gislason

1631558340

Learn All About Flask Vs FastAPI Web Framework: Comparison Different

Being a Data Scientist does not end with Model Building, but working towards the next step, Model Deployment. This group of people might not understand coding and won’t understand by viewing your codes; they would prefer to view the final application, allowing them to view the results immediately. In this article, I will introduce two different frameworks that can quickly set up web servers: Flask and FastAPI.
 

#flask #fastapi #frameworks 

Learn All About Flask Vs FastAPI Web Framework: Comparison Different

Simple and Easy to Learn Declarative Navigation Framework for Flutter

A simple and easy to learn declarative navigation framework for Flutter, based on Navigator 2.0 (Router).

If you love Flutter, you would love declarative UI and therefore declarative navigation.

Navigator 2.0 provides a declarative navigation API. Unfortunately, it's too complex and difficult to use with a lot of boilerplate. Not only that, it requires to keep a single state to manage the whole navigation system of your application. It's not a good architecture, and definitely does not fit in large scale applications.

Navi helps you keep all the powerful of Navigator 2.0 but with a simple and easy to learn API. It helps you manage your navigation system in split and isolated domains.

Note that, imperative navigation API is also supported as an extra layer beyond the declarative API.

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add navi

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  navi: ^0.2.2

Alternatively, your editor might support or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:navi/navi.dart'; 

example/example.md

All examples

Quick example

Below is an app with 2 pages:

  • / shows list of books
  • /:id shows a book.
dependencies:
  navi: any
import 'package:flutter/material.dart';
import 'package:navi/navi.dart';

void main() {
  runApp(App());
}

class App extends StatelessWidget {
  final _informationParser = NaviInformationParser();
  final _routerDelegate = NaviRouterDelegate.material(child: BooksStack());

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routeInformationParser: _informationParser,
      routerDelegate: _routerDelegate,
    );
  }
}
// your BooksStack widget state should use NaviRouteMixin in order to receive notification on route change
class _BooksStackState extends State<BooksStack> with NaviRouteMixin<BooksStack> {
  Book? _selectedBook;

  @override
  void onNewRoute(NaviRoute unprocessedRoute) {
    // if route changes (ex. browser address bar or deeplink), convert route to your state and rebuild the widget (stack)
    final bookId = int.tryParse(unprocessedRoute.pathSegmentAt(0) ?? '');
    _selectedBook = getBookById(bookId); // ex. get from database
    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    // you can nest NaviStack under another NaviStack without limitation to create nested routes
    // see 'Nested stack' secion below
    return NaviStack(
      pages: (context) => [
        NaviPage.material(
          key: const ValueKey('Books'),
          // without route property, url is '/' by default
          // BooksPagelet is your widget, which shows list of books
          child: BooksPagelet(
            // you can update state of BooksStack widget to navigate
            // or you can use context.navi to navigate inside BooksPagelet (see 'Navigate to a new route' section below)
            onSelectBook: (book) => setState(() {
              _selectedBook = book;
            }),
          ),
        ),
        if (_selectedBook != null)
          NaviPage.material(
            key: ValueKey(_selectedBook),
            route: NaviRoute(path: ['${_selectedBook!.id}']), // url is '/:id'
            // BookPagelet is your widget, which shows a book
            child: BookPagelet(book: _selectedBook!),
          ),
      ],
      onPopPage: (context, route, dynamic result) {
        // update state when pop
        if (_selectedBook != null) {
          setState(() {
            _selectedBook = null;
          });
        }
      },
    );
  }
}

Download Details:

Author: zenonine

Source Code: https://github.com/zenonine/navi

#flutter  #frameworks 

Simple and Easy to Learn Declarative Navigation Framework for Flutter