true_design_system_component 1.0.2 copy "true_design_system_component: ^1.0.2" to clipboard
true_design_system_component: ^1.0.2 copied to clipboard

outdated

Hick's law (Welford, 1980) states that mean response time in simple decision tasks is a linear function of the transmitted information.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'True Design System Component',
      theme: ThemeData(
        primarySwatch: Colors.red,
      ),
      home: const HomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(
          'True Design System Component',
        ),
      ),
      body: SingleChildScrollView(
        child: Padding(
          padding: const EdgeInsets.fromLTRB(20, 12, 20, 0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.stretch,
            children: [
              const Text(
                'Filled buttons',
                style: TextStyle(
                  fontSize: 20,
                  fontWeight: FontWeight.bold,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              const Text(
                'class: TDSFilledButton',
                style: TextStyle(
                  fontSize: 14,
                  fontWeight: FontWeight.normal,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              Wrap(
                spacing: 12,
                runSpacing: 12,
                children: [
                  TDSFilledButton(
                    label: 'Label',
                    isRounded: true,
                    onPressed: () {},
                  ),
                  TDSFilledButton(
                    label: 'Label',
                    isRounded: true,
                    onPressed: () {},
                    icon: 'assets/icons/activity_icon.png',
                  ),
                  TDSFilledButton(
                    label: 'Label',
                    isRounded: true,
                    onPressed: () {},
                    enabled: false,
                    icon: 'assets/icons/activity_icon.png',
                  ),
                ],
              ),
              const SizedBox(
                height: 24,
              ),
              const Text(
                'Outlined buttons',
                style: TextStyle(
                  fontSize: 20,
                  fontWeight: FontWeight.bold,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              const Text(
                'class: TDSOutlinedButton',
                style: TextStyle(
                  fontSize: 14,
                  fontWeight: FontWeight.normal,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              const Wrap(
                spacing: 12,
                runSpacing: 12,
                children: [
                  TDSOutlinedButton(
                    label: "label",
                  ),
                  TDSOutlinedButton(
                    label: "label",
                    icon: 'assets/icons/activity_icon.png',
                  ),
                  TDSOutlinedButton(
                    label: "label",
                    enabled: false,
                    icon: 'assets/icons/activity_icon.png',
                  )
                ],
              ),
              const SizedBox(
                height: 24,
              ),
              const Text(
                'Text buttons',
                style: TextStyle(
                  fontSize: 20,
                  fontWeight: FontWeight.bold,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              const Text(
                'class: TDSTextButton',
                style: TextStyle(
                  fontSize: 14,
                  fontWeight: FontWeight.normal,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              const Wrap(
                spacing: 12,
                runSpacing: 12,
                children: [
                  TDSTextButton(
                    label: "Label",
                  ),
                  TDSTextButton(
                    label: "Label",
                    icon: 'assets/icons/activity_icon.png',
                  ),
                  TDSTextButton(
                    label: "Label",
                    icon: 'assets/icons/activity_icon.png',
                    enabled: false,
                  ),
                ],
              ),
              const SizedBox(
                height: 24,
              ),
              const Text(
                'Tonal buttons',
                style: TextStyle(
                  fontSize: 20,
                  fontWeight: FontWeight.bold,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              const Text(
                'class: TDSTonalButton',
                style: TextStyle(
                  fontSize: 14,
                  fontWeight: FontWeight.normal,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              const Wrap(
                spacing: 12,
                runSpacing: 12,
                children: [
                  TDSTonalButton(
                    label: "Label",
                  ),
                  TDSTonalButton(
                    label: "Label",
                    icon: 'assets/icons/activity_icon.png',
                  ),
                  TDSTonalButton(
                    label: "Label",
                    icon: 'assets/icons/activity_icon.png',
                    enabled: false,
                  ),
                ],
              ),
              const SizedBox(
                height: 24,
              ),
              const Text(
                'Typography',
                style: TextStyle(
                  fontSize: 20,
                  fontWeight: FontWeight.bold,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              const Text(
                'class: TDSDisplayLargeText',
                style: TextStyle(
                  fontSize: 14,
                  fontWeight: FontWeight.normal,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              const TDSDisplayLargeText(
                "Display",
              ),
              const SizedBox(
                height: 8,
              ),
              const Text(
                'class: TDSDisplayMediumText',
                style: TextStyle(
                  fontSize: 14,
                  fontWeight: FontWeight.normal,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              const TDSDisplayMediumText(
                "Display",
              ),
              const SizedBox(
                height: 8,
              ),
              const Text(
                'class: TDSDisplaySmallText',
                style: TextStyle(
                  fontSize: 14,
                  fontWeight: FontWeight.normal,
                ),
              ),
              const SizedBox(
                height: 8,
              ),
              const TDSDisplaySmallText(
                "Display",
              ),
            ],
          ),
        ),
      ),
    );
  }
}
4
likes
0
points
35
downloads

Publisher

unverified uploader

Weekly Downloads

Hick's law (Welford, 1980) states that mean response time in simple decision tasks is a linear function of the transmitted information.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, version

More

Packages that depend on true_design_system_component