constrained_scroll_view 0.1.0 copy "constrained_scroll_view: ^0.1.0" to clipboard
constrained_scroll_view: ^0.1.0 copied to clipboard

A widget that prevents the content to be hidden from the keyboard or the screen resolution change.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'ConstrainedScrollView Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const Home(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      // Change the screen to the horizontal view and see how the content becomes scrollable.
      body: ConstrainedScrollView(
        // The Column widget is usually used as a child.
        child: Column(
          children: [
            Container(
              color: Colors.blue,
              width: 100,
              height: 100,
            ),
            Container(
              color: Colors.red,
              width: 100,
              height: 100,
            ),
            Container(
              color: Colors.green,
              width: 100,
              height: 100,
            ),
            Container(
              color: Colors.yellow,
              width: 100,
              height: 100,
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
160
points
17
downloads

Publisher

unverified uploader

Weekly Downloads

A widget that prevents the content to be hidden from the keyboard or the screen resolution change.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on constrained_scroll_view