customize_tabbar_view 0.0.2 copy "customize_tabbar_view: ^0.0.2" to clipboard
customize_tabbar_view: ^0.0.2 copied to clipboard

A new Flutter project.

Example/main.dart

import 'package:customize_tabbar_view/customize_tabbar.dart';
import 'package:flutter/material.dart';

class MyPage extends StatefulWidget {
  const MyPage({Key? key}) : super(key: key);

  @override
  _MyPageState createState() => _MyPageState();
}

class _MyPageState extends State<MyPage> {
  late final data = [
    {"title": "未处理", "id": "0", "isSelected": true},
    {"title": "已处理", "id": "1", "isSelected": false},
    {"title": "退单", "id": "2", "isSelected": false}
  ];

  @override
  Widget build(BuildContext context) {
    return AppBar(
      title: const Text(
        '我的客户',
      ),
      bottom: PreferredSize(
          child: CustomizeTabBar(
            size: const Size(375, 40),
            data: data,
            unSelectedColor: Colors.white,
            selectColor: Colors.tealAccent,
            unSelectedTextStyle: const TextStyle(
              color: Colors.black,
              fontSize: 15,
            ),
            selectTextStyle: const TextStyle(
              color: Colors.white,
              fontSize: 15,
            ),
            item: 30.0,
            tabBarTapped: (value) {
              debugPrint("CustomizeTabBar----->${value.title}");
            },
          ),
          preferredSize: Size(375, 40)),
    );
  }
}
1
likes
90
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter project.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on customize_tabbar_view