agnostic_split_view 0.1.2 copy "agnostic_split_view: ^0.1.2" to clipboard
agnostic_split_view: ^0.1.2 copied to clipboard

A framework-agnostic split view for Flutter. Zero Material/Cupertino dependencies. Headless, themable, high-performance.

example/lib/main.dart

import 'package:agnostic_split_view/agnostic_split_view.dart';
import 'package:agnostic_split_view_example/widgets/custom_divider.dart';
import 'package:flutter/material.dart';

/// A minimal, self-contained example of [SplitView].
///
/// For a full-featured, nested IDE-style layout demo with custom dividers,
/// see [demo_shell.dart] in this directory.
void main() => runApp(const MinimalExampleApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(brightness: Brightness.dark),
      home: Scaffold(
        body: SplitView(
          direction: SplitDirection.horizontal,
          firstCollapsible: true,
          minFirstPaneSize: 150,
          maxFirstPaneSize: 400,
          dividerBuilder: (context, state) => CustomDivider(state: state),

          // Pane 1: Sidebar
          first: Container(
            color: const Color(0xFF1E1E1E),
            child: const Center(
              child: Text(
                'Sidebar\n(Drag to resize or collapse)',
                textAlign: TextAlign.center,
                style: TextStyle(color: Colors.white70),
              ),
            ),
          ),

          // Pane 2: Main Content
          second: Container(
            color: const Color(0xFF2D2D2D),
            child: const Center(
              child: Text(
                'Main Content Area',
                style: TextStyle(color: Colors.white, fontSize: 18),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
1
likes
160
points
0
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A framework-agnostic split view for Flutter. Zero Material/Cupertino dependencies. Headless, themable, high-performance.

Repository (GitHub)
View/report issues

Topics

#split-view #layout #responsive #flutter #widget

License

MIT (license)

Dependencies

flutter

More

Packages that depend on agnostic_split_view