如何删除底部应用栏边框

问题描述 投票:0回答:2

所以我只是用 tabbar 制作了 sliverappbar 一切都很好,直到这个边框底部从任何地方出现,正如你在图像中看到的,tabbar 和 tabbarview 之间有一条细线,我想摆脱它,我以为它是高程但我已经把它设置为 0 a 而且它仍然在那里



这是应用程序栏代码

SliverAppBar(
      iconTheme: IconThemeData(color: Colors.white),
      titleSpacing: 18.w,
      backgroundColor: Const.colorPrimary,
      elevation: 0,
      automaticallyImplyLeading: false,
      title: Text(
        'Star Movie',
        style: Const.textPrimary,
      ),
      actions: [
        IconButton(
          constraints: BoxConstraints(),
          padding: EdgeInsets.zero,
          onPressed: () {},
          icon: Image.asset(
            'assets/icon_search.png',
            width: 24.w,
          ),
        ),
        SizedBox(width: 18.w),
      ],
      bottom: PreferredSize(
        preferredSize: new Size(80.w, 80.h),
        child: Container(
          color: Const.colorPrimary,
          padding: EdgeInsets.fromLTRB(0.w, 16.h, 0.w, 16.h),
          child: Container(
            height: 48.h,
            margin: EdgeInsets.fromLTRB(18.w, 0, 18.w, 0),
            padding: EdgeInsets.fromLTRB(4.w, 4.h, 4.w, 4.h),
            decoration: BoxDecoration(
              border: Border.all(color: Const.colorIndicatorBorder),
              borderRadius: BorderRadius.circular(50.r),
            ),
            child: TabBar(
              indicator: ShapeDecoration(
                shape: StadiumBorder(),
                color: Const.colorIndicator,
              ),
              labelStyle: Const.textPrimary.copyWith(fontSize: 14.sp),
              tabs: [
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                  children: [
                    Image.asset(
                      'assets/icon_now_showing.png',
                      width: 24.w,
                    ),
                    Tab(text: 'Now Showing'),
                  ],
                ),
                Tab(text: 'Coming Soon'),
              ],
            ),
          ),
        ),
      ),
    );
flutter dart
2个回答
0
投票

您可以通过调用

border
并提供 width=0/color=containerColor 来删除这些粗线。

 Container(
  decoration: BoxDecoration(
  border: Border.all(color: yourBackgroundColor, width:0),
   ),

0
投票

尝试删除它:

border: Border.all(color: Const.colorIndicatorBorder)

© www.soinside.com 2019 - 2024. All rights reserved.