float_column 2.0.1 icon indicating copy to clipboard operation
float_column: ^2.0.1 copied to clipboard

Flutter FloatColumn widget for building a vertical column of widgets and text where the text wraps around floated widgets, similar to how CSS float works.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'pages/basic_ltr.dart';
import 'pages/basic_rtl.dart';
import 'pages/indents.dart';
import 'pages/inline_floats.dart';
import 'pages/margins_and_padding.dart';
import 'pages/nested.dart';

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

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

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

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

  @override
  Widget build(BuildContext context) {
    const tabs = <String, Widget>{
      'Basic LTR': BasicLtr(),
      'Basic RTL': BasicRtl(),
      'Inline': InlineFloats(),
      'Nested': Nested(),
      'Indents': Indents(),
      'Margins & Padding': MarginsAndPadding(),
    };

    final tabsTitles = tabs.entries.map((e) => Tab(text: e.key)).toList();
    final tabViews = tabs.entries.map((e) => e.value).toList();

    return DefaultTabController(
      length: tabs.length,
      child: Scaffold(
        appBar: AppBar(title: TabBar(tabs: tabsTitles, isScrollable: true)),
        body: SelectionArea(child: TabBarView(children: tabViews)),
      ),
    );
  }
}
42
likes
140
pub points
91%
popularity

Publisher

verified publisher iconronbooth.com

Flutter FloatColumn widget for building a vertical column of widgets and text where the text wraps around floated widgets, similar to how CSS float works.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on float_column