flutter95 0.0.5 copy "flutter95: ^0.0.5" to clipboard
flutter95: ^0.0.5 copied to clipboard

outdated

Windows95 UI components for Flutter apps

example/lib/main.dart

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

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

class Flutter95App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      color: Flutter95.background,
      home: Scaffold95(
        title: 'Flutter95',
        toolbar: Toolbar95(actions: [
          Item95(
            label: 'File',
            onTap: () {},
          ),
          Item95(
            label: 'Edit',
            onTap: () {},
          ),
          Item95(
            label: 'Save',
          ),
        ]),
        body: Padding(
          padding: const EdgeInsets.symmetric(horizontal: 4.0),
          child: Elevation95(
            type: Elevation95Type.down,
            child: Column(
              children: <Widget>[
                const SizedBox(height: 4),
                Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    Button95(
                      onTap: () {},
                      child: Text('Button95'),
                    ),
                    Button95(
                      child: Text('Disabled'),
                    ),
                  ],
                ),
                const SizedBox(height: 4),
                Text(
                  'Text with Flutter95.textStyle',
                  style: Flutter95.textStyle,
                ),
                Padding(
                  padding: const EdgeInsets.symmetric(horizontal: 8.0),
                  child: TextField95(),
                ),
                _buildListView(),
              ],
            ),
          ),
        ),
      ),
    );
  }

  /// Build a ListView wrapping it in [Elevation95] with [Elevation95Type.down].
  /// This will create a "deep" container.
  /// Then wrap each item with [Elevation95Type.up] to create an up effect.
  Padding _buildListView() {
    return Padding(
      padding: const EdgeInsets.symmetric(
        horizontal: 8.0,
        vertical: 8.0,
      ),
      child: Elevation95(
        type: Elevation95Type.down,
        child: SizedBox(
          height: 100,
          child: ListView.builder(
            padding: EdgeInsets.zero,
            itemCount: 100,
            itemBuilder: (context, index) {
              return Elevation95(
                child: Padding(
                  padding: const EdgeInsets.all(8.0),
                  child: Text(
                    'Item $index',
                    style: Flutter95.textStyle,
                  ),
                ),
              );
            },
          ),
        ),
      ),
    );
  }
}
152
likes
0
pub points
56%
popularity

Publisher

verified publisherbeltran.work

Windows95 UI components for Flutter apps

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter95