adaptive_components 0.0.10 copy "adaptive_components: ^0.0.10" to clipboard
adaptive_components: ^0.0.10 copied to clipboard

A Flutter package to implement responsive layouts in Material Design.

example/lib/main.dart

// Copyright 2020, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:flutter/material.dart';

import 'adaptive_column_example.dart';
import 'adaptive_container_example.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Adaptive Navigation Scaffold Demo',
      home: DemoSelector(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              child: const Text('Adaptive Column'),
              onPressed: () {
                Navigator.of(context).pushReplacement(
                  MaterialPageRoute(
                    builder: (context) {
                      return const AdaptiveColumnsExample();
                    },
                  ),
                );
              },
            ),
            ElevatedButton(
              child: const Text('Adaptive Container'),
              onPressed: () {
                Navigator.of(context).pushReplacement(
                  MaterialPageRoute(
                    builder: (context) {
                      return const AdaptiveContainerExample();
                    },
                  ),
                );
              },
            ),
            const SizedBox(height: 16),
          ],
        ),
      ),
    );
  }
}
93
likes
140
pub points
91%
popularity
screenshot

Publisher

verified publishermaterial.io

A Flutter package to implement responsive layouts in Material Design.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

adaptive_breakpoints, adaptive_navigation, flutter

More

Packages that depend on adaptive_components