0

I am customizing the bottom navbar in flutter but I get a problem with the bottom navbar. I trying to remove the background of the bottom navbar but I can't remove it. What I was wrong.Thank you for supporting me. Below is my code and my screen.

import 'dart:async';
import 'package:cmd_mobile/core/constants/assets_font.dart';
import 'package:cmd_mobile/core/constants/dimension_constanst.dart';
import 'package:cmd_mobile/core/styles/text_style.dart';
import 'package:cmd_mobile/presentation/widgets/bottom_nav_bar_item.dart';
import 'package:cmd_mobile/presentation/widgets/category.dart';
import 'package:cmd_mobile/presentation/widgets/catgory_item.dart';
import 'package:flutter/material.dart';
import '../../core/constants/assets_images.dart';
import '../../core/constants/color_constants.dart';
import '../../core/styles/main_style.dart';

class MainScreen extends StatefulWidget {
const MainScreen({super.key});
static const String routeName = "/main_screen";
@override
State<MainScreen> createState() => _MainScreenState();
}

class _MainScreenState extends State<MainScreen> {
// StreamController _streamController = StreamController();
// Stream get _streamCurrentStack => _streamController.stream;
int _curentStack = 2;
void _changeStackCurrent(index) {
setState(() {
  _curentStack = index;
});
// _streamController.sink.add(index);
}

PageController pageController = PageController();
@override
Widget build(BuildContext context) {
  return Scaffold(
  body: SafeArea(
    child: SingleChildScrollView(
        child: //widget here,
    )),
  ),
  extendBody: true,
  bottomNavigationBar: ClipRRect(
    borderRadius: const BorderRadius.only(
        topLeft: Radius.circular(30), topRight: Radius.circular(60)),
    child: Container(
      color: ColorPalette.primaryColor,
      height: 80,
    ),
    ),
  );
 }
 }
[imagedescription][1]

<img src="https://i.stack.imgur.com/f8wtb.png" width="250">
  • Remove `color: ColorPalette.primaryColor`?! – Tirth Patel Sep 23 '22 at 17:42
  • I am so sorry if my question was not clear. "color: ColorPalette.primaryColor" used to set the color for my bottom navbar, but my problems in the top left and top right display areas with background white and I wanna remove it. if you do not then you can run a code snippet, it will show my screenshot because I can not add the image to my post. Thank you for supporting me. – Drake Nguyen Sep 24 '22 at 01:48
  • oh okay. cool... that white thing is due to `borderRadius` I guess. – Tirth Patel Sep 24 '22 at 06:22

0 Answers0