fluda 1.1.0 copy "fluda: ^1.1.0" to clipboard
fluda: ^1.1.0 copied to clipboard

Fluda is a library which makes Flutter application development faster and easier. It makes your code clean and easy to read.

example/lib/main.dart

import 'package:fluda/fluda.dart';
import 'package:fluda/widgets/tappable.dart';
import 'package:flutter/material.dart';

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

class FludaExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Fluda Demo',
      home: MainScreen(),
    );
  }
}

class MainScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Padding(
          padding: const EdgeInsets.symmetric(
            horizontal: FludaX.x3,
          ),
          child: Column(
            children: <Widget>[
              Text(
                fludaDescription,
                style: context.theme.textTheme.bodyLarge,
              ),
              Padding(
                padding: const EdgeInsets.only(
                  top: FludaX.x2,
                ),
                child: TextFormField(
                  controller: TextEditingController(
                    text: "simon@simonit.dev",
                  ),
                  validator: (text) {
                    final isValid = text.validateEmail();
                    return isValid ? null : "Not a valid email address!";
                  },
                  autovalidateMode: AutovalidateMode.onUserInteraction,
                ),
              ),
              Padding(
                padding: const EdgeInsets.only(
                  top: FludaX.x2,
                ),
                child: Row(
                  children: <Widget>[
                    Tappable(
                      onTap: () {
                        context.focus.hideKeyboard();
                      },
                      child: Container(
                        color: context.theme.primaryColor,
                        decoration: BoxDecoration(
                          border: Border.all(
                            color: context.theme.primaryColor,
                          ),
                          borderRadius: BorderRadius.circular(FludaX.x4),
                        ),
                        padding: const EdgeInsets.all(FludaX.x * 1.5),
                        child: Text(
                          "Hide keyboard",
                          style: context.theme.primaryTextTheme.button,
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

const fludaDescription =
    "Fluda is a library which makes Flutter application development faster and easier. It makes your code clean and easy to read.";
6
likes
130
pub points
35%
popularity

Publisher

verified publishersofluffy.io

Fluda is a library which makes Flutter application development faster and easier. It makes your code clean and easy to read.

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on fluda