just_ui 0.0.1-alpha.2 copy "just_ui: ^0.0.1-alpha.2" to clipboard
just_ui: ^0.0.1-alpha.2 copied to clipboard

A lightweight and utilitarian UI package for Flutter, focused on business applications.

example/lib/main.dart

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

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: JustTheme.light(),
      home: Scaffold(
        appBar: AppBar(title: const Text('Just UI Example')),
        body: Padding(
          padding: const EdgeInsets.all(16.0),
          child: JustForm(
            fields: [
              JustTextField(
                label: 'Email',
                hint: 'Enter your email',
                validator: (value) {
                  if (value == null || value.isEmpty) {
                    return 'Please enter an email';
                  }
                  if (!RegExp(r'^[^@]+@[^@]+\.[^@]+').hasMatch(value)) {
                    return 'Invalid email format';
                  }
                  return null;
                },
              ),
              JustTextField(
                label: 'Password',
                hint: 'Enter your password',
                obscureText: true,
                validator: (value) {
                  if (value == null || value.isEmpty) {
                    return 'Please enter a password';
                  }
                  if (value.length < 6) {
                    return 'Password must be at least 6 characters';
                  }
                  return null;
                },
              ),
            ],
            onSubmit: (data) {
              // Form Submitted
            },
            submitButtonText: 'Sign In',
          ),
        ),
      ),
    );
  }
}
5
likes
0
points
15
downloads

Publisher

verified publishercode.meydanca.com

Weekly Downloads

A lightweight and utilitarian UI package for Flutter, focused on business applications.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on just_ui