adaptive_codabee 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new52

Adaptive Codabee #

Apprendre à créer un package qui s'adapte selon l'OS utilisé. Ce package est destiné à la création d'applications Flutter

ScreenShot

ScreenShot

Getting Started #

Pour utiliser ce package, ajouter au pubspec.yaml:

dependencies:
    adaptive_codabee: ^1.0.1

Usage #

Dans le fichier Dart, importez:

import 'package:adaptive_codabee/adaptive_codabee.dart';

Intégrer un Scaffold


  Widget build(BuildContext context) {
    return Adaptive.scaffold(
        string: "Notre package Importé", 
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: <Widget>[
              Adaptive.text(
                  string: "Notre application s'adapte automatiquement",
                  color: Colors.red,
                  size: 25,
                  align: TextAlign.center
              ),
              Adaptive.button(
                  child: Adaptive.text(string: "Press me"),
                  onPressed: () {
                    /// Effectuer une action
                    print("test");
                  }
                  ),
              Adaptive.button(
                  child: Adaptive.text(string: "Montrer l'alerte"), onPressed: () {
                    Adaptive.alert(
                        context: context,
                        callback: () {
                          Navigator.of(context).pop();
                        }
                    );
              })
            ],
          ),
        )
    );
  }

[1.0.1] - 2020-06-18 #

  • Ajout de Screenshots readme.
  • Fonctions spécifiques privatisées.

[1.0.0] - 2020-06-18 #

  • Ajout de documentation sur le code dart.

[0.0.1] - 2020-06-16 #

  • Création du package initial.
  • Destiné à l'apprentissage de la création de packages.
  • Scaffold
  • Text
  • Alert
  • Button

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:adaptive_codabee/adaptive_codabee.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,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    return Adaptive.scaffold(
        string: "Test",
        body: Center(child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: <Widget>[
            Adaptive.text(string: "Ceci est notre app test", color: Colors.pink),
            Adaptive.button(child: Adaptive.text(string: "Erreur"), onPressed: () {
              Adaptive.alert(context: context, callback: () {
                print("Success");
                Navigator.of(context).pop();
              });
            })
          ],
        )
        )
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  adaptive_codabee: ^1.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:adaptive_codabee/adaptive_codabee.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
3
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
52
Learn more about scoring.

We analyzed this package on Jul 14, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • adaptive_codabee that is a package requiring null.

Package not compatible with runtime flutter-web on Web

Because:

  • package:adaptive_codabee/adaptive_codabee.dart that imports:
  • dart:io

Health suggestions

Format lib/adaptive_codabee.dart.

Run flutter format to format lib/adaptive_codabee.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test