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

Extensions, widgets and other utilities that are missing in Flutter's SDK.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Micha Core Example',
      theme: ThemeData(
        extensions: const [
          // use theme extensions to customize default values
          SpinnerThemeData(size: 32),
        ],
      ),
      home: const HomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    const itemCount = 10;

    return Scaffold(
      body: SingleChildScrollView(
        child: Center(
          child: Column(
            children: itemCount // generate a list of a given length
                .times<Widget>(
                  // use themed Text without referencing BuildContext explicitly
                  (index) => ThemedText.headlineMedium('item $index'),
                )
                // add a Gap in-between the Text widgets, use math operators to modify the scale.
                .separated(const Gap() + 2),
          ),
        ),
      ),
    );
  }
}
3
likes
160
points
37
downloads

Publisher

unverified uploader

Weekly Downloads

Extensions, widgets and other utilities that are missing in Flutter's SDK.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, logging

More

Packages that depend on micha_core