menu_table_switch 0.0.7 copy "menu_table_switch: ^0.0.7" to clipboard
menu_table_switch: ^0.0.7 copied to clipboard

This is a flutter package that allows you to display the menu in the form of a horizontally scrolling table.

example/lib/main.dart

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

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
          title: const Center(
        child: Text(
          'Menu table switch demo',
          style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500),
        ),
      )),
      body: MenuTableSwitch(
        titles: const ['Pink', 'Black', 'Orange', 'Green', 'yellow', 'Brown'],
        children: [
          Container(
            color: Colors.pink,
            child: const Center(
                child: Text(
              'Pink',
              style: TextStyle(
                  fontSize: 30,
                  fontWeight: FontWeight.w700,
                  color: Colors.white),
              textAlign: TextAlign.center,
            )),
          ),
          Container(
            color: Colors.black,
            child: const Center(
                child: Text(
              'Black',
              style: TextStyle(
                  fontSize: 30,
                  fontWeight: FontWeight.w700,
                  color: Colors.white),
              textAlign: TextAlign.center,
            )),
          ),
          Container(
            color: Colors.orange,
            child: const Center(
                child: Text(
              'Orange',
              style: TextStyle(
                  fontSize: 30,
                  fontWeight: FontWeight.w700,
                  color: Colors.white),
              textAlign: TextAlign.center,
            )),
          ),
          Container(
            color: Colors.green,
            child: const Center(
                child: Text(
              'Green',
              style: TextStyle(
                  fontSize: 30,
                  fontWeight: FontWeight.w700,
                  color: Colors.white),
              textAlign: TextAlign.center,
            )),
          ),
          Container(
            color: Colors.yellow,
            child: const Center(
                child: Text(
              'Yellow',
              style: TextStyle(
                  fontSize: 30,
                  fontWeight: FontWeight.w700,
                  color: Colors.white),
              textAlign: TextAlign.center,
            )),
          ),
          Container(
            color: Colors.brown,
            child: const Center(
                child: Text(
              'Brown',
              style: TextStyle(
                  fontSize: 30,
                  fontWeight: FontWeight.w700,
                  color: Colors.white),
              textAlign: TextAlign.center,
            )),
          )
        ],
      ),
    );
  }
}
3
likes
150
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

This is a flutter package that allows you to display the menu in the form of a horizontally scrolling table.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on menu_table_switch