flutter_john 0.0.1 copy "flutter_john: ^0.0.1" to clipboard
flutter_john: ^0.0.1 copied to clipboard

A new Flutter package project.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_john/flutter_john.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.teal,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return FlutterJohn.scaffold(
        string: widget.title,
        body: Center(
            child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          children: [
            FlutterJohn.text(
                string: "Welcome to home",
                color: Colors.lightBlue,
                size: 20,
                align: TextAlign.center),
            ElevatedButton(
                onPressed: () {
                  FlutterJohn.alert(context: context, text: "Salut les amis");
                },
                child: FlutterJohn.text(string: "Pressing")),
          ],
        )));
  }
}
0
likes
140
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter package project.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_john