Search packages, repositories and app categories

Package detailsv0.1.0

flemme

Flutter , Light , Early, Making, Material, Environnement. Simplify the writing of your widgets with Flemme!

AndroidiOSWebmacOSWindowsLinux
30-day downloads
46
Likes
19
Pub points
60

Install package

flutter pub add flemme

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Flemme is a Flutter package designed to simplify widget creation with a lightweight, early-material approach to UI development. It enhances productivity by reducing boilerplate code and streamlining common widget patterns. Built with simplicity in mind, Flemme supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, making it ideal for developers seeking a clean, efficient way to build user interfaces. The package integrates seamlessly into existing Flutter projects and promotes a more intuitive coding experience.

Use cases

  • Rapid UI prototyping
  • Reducing repetitive widget code
  • Streamlining material design implementation
  • Cross-platform UI development
  • Simplifying complex widget trees
  • Enhancing developer productivity

Key features

  • Minimal boilerplate
  • Early-material design principles
  • Cross-platform compatibility
  • Intuitive API
  • Lightweight footprint
  • Easy integration with Flutter

Suitable for

  • Flutter beginners
  • Experienced developers seeking efficiency
  • Teams focused on rapid development
  • Projects requiring consistent UI patterns
  • Developers using material design extensively
  • Apps targeting multiple platforms

Considerations

  • Limited documentation available
  • May require learning new conventions
  • Best suited for simple to moderately complex UIs
  • Not ideal for highly customized widget architectures
  • Depends on community adoption for long-term support
  • Potential learning curve for new users

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

flemme

Plaftorm Flutter pub package GitHub stars GitHub forks GitHub license GitHub issues

Flutter , Light , Early, Making, Material, Environnement Simplify the writing of your widgets with Flemme

Installation

Add flemme as a dependency in your pubspec.yaml file.

dependencies:
  flemme: ^0.1.0

Get Started

For use Flemme object by following steps :

import 'package:flemme/flemme.dart';

Defaut code Flutter Example:


Scaffold defaultFlutterScaffoldExample() {
  return Scaffold(
    appBar: AppBar(
      title: Text(widget.title),
    ),
    body: Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          const Text(
            'You have pushed the button this many times:',
          ),
          Text(
            '$_counter',
            style: Theme.of(context).textTheme.headline4,
          ),
        ],
      ),
    ),
    floatingActionButton: FloatingActionButton(
      onPressed: _incrementCounter,
      tooltip: 'Increment',
      child: const Icon(Icons.add),
    ), // This trailing comma makes auto-formatting nicer for build methods.
  );
}

Same with Flemme:

 
Scaffold flemmeScaffoldExample() {
  return Scaffold(
    appBar: AppBar(
      title: widget.title.toTextWidget(),
    ),
    body: [
      'You have pushed the button this many times:'.toTextWidget(),
      '$_counter'.toTextWidget(style: Theme.of(context).textTheme.headline4),
    ].listToColumn(mainAxisAlignment: MainAxisAlignment.center).withCenter(),
    floatingActionButton: FloatingActionButton(
      onPressed: _incrementCounter,
      tooltip: 'Increment',
      child: const Icon(Icons.add),
    ), // This trailing comma makes auto-formatting nicer for build methods.
  );
}

For all Widget

Create and custom Padding

// default value :  EdgeInsets.all(8.0)
Padding myPadding = Text('sample').withPadding();

// you can custome like  :  
Padding myPadding = Text('sample').withPadding(padding: EdgeInsets.all(20.0));

Encapsulate your Widget in another

// Center
Center center = myText.withCenter();
// Flexible
// defaut value flex = 1 , FlexFir = FlexFit.tight
Flexible myFlexible = myText.withFlexible();
Flexible myFlexible = myText.withFlexible(flex:2);

//  Expanded
// defaut value flex = 1 
Expanded myExpanded = myText.withExpanded();
Expanded myExpanded = myText.withExpanded(flex:2);

//Container
Container myContainer = myText.withContainer();

//SizeBox
SizeBox mySizedBox = myText.withSizedBox();

//FractionallySizedBox
FractionallySizedBox myFractionallySizedBox = myText.withFractionallySizedBox();

Generate a modal from a widget

  //context is necessary
 Container().showHimself(context);

  // custom background color, default transparent:
  Container().showHimself(context, bgColor:Colors.red);

For String

    //ellips text with '...' defaut value lenght 140
    String textShort = 'text too long'.ellipse();

    //custom lenght: 
    String textShort = 'text too long'.ellipse(lenght:32);
    
    //Convert quickly String to Text Widget
    Text myText = 'my sample'.toTextWidget();
    // you can custom with every Text parameter

For DateTime

    //convert DateTime to short string 
    //String like 10 seconds ago, a minute ago, 7 hours ago, etc. if is before now
    //String like in 10 seconds , in a minute, in 7 hours, etc. if is after now
    String time = DateTime().returnDateSmall();


For List

List<Widget> myList = ['sample'.toTextWidget(),'sample'.toTextWidget(),'sample'.toTextWidget(),'sample'.toTextWidget()];

//Convert list to Row
Row myRow = myList.listToRow();

//Convert list to Column
Column myRow = myList.listToColumn();

Configure and use default padding

You can use and config default padding.

Call FlemmeConfig() for use and config. It's a single instance, you don't need to put it statically in your code, just call it where you need it. Preferably before your MaterialApp

 FlemmeConfig().paddingAllM = const EdgeInsets.all(100); // default padding

Default value is configure like this:

  EdgeInsets paddingAllSM = const EdgeInsets.all(4);
  EdgeInsets paddingAllS = const EdgeInsets.all(8);
  EdgeInsets paddingAllM = const EdgeInsets.all(12);
  EdgeInsets paddingAllL = const EdgeInsets.all(20);
  EdgeInsets paddingAllXL = const EdgeInsets.all(32);

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

No data available yet.