2017-12-11 5 views
0

떨림 숨겨진/오버 플로우 표시되지 SliverAppBar 바닥 TabBar의/- SliverAppBar TabBar의 내가 flexibleSpace과 관련된 문제를 문질러서 처음 플러터 :

을 표시하지, 그래서 그것을 댓글을 달았지만, 블랙 + 노란색 테두리가 아직.

https://youtu.be/FcNMTg6ok4s

YouTube 동영상은 ^^^

enter image description here

enter image description here

return new DefaultTabController(
     length: 2, 
     child: new Scaffold(
     body: new NestedScrollView(
      headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { 
      return <Widget>[ 
       new SliverAppBar(
       forceElevated: innerBoxIsScrolled, 
       floating: true, 
       //elevation: elevation, 
       pinned: true, 
       expandedHeight: 250.0, 
       bottom: new TabBar(
        tabs: <Tab>[ 
        new Tab(
         text: 'green', 
         icon: new Icon(Icons.show_chart), 
        ), 
        new Tab(
         text: 'purple', 
         icon: new Icon(Icons.history), 
        ), 
        ], 
       ), 
       flexibleSpace: new FlexibleSpaceBar(
        title: new FarsiText(
        "آقای نوری", 
        style: titleTextStyle, 
       ), 
        centerTitle: true, 
        background: new Container(
        decoration: new BoxDecoration(
         gradient: new LinearGradient(
         begin: const Alignment(0.5, -0.5), 
         end: const Alignment(-1.5, 1.5), 
         colors: <Color>[ 
          Colors.purple[400], 
          Colors.lightBlue[100], 
         ], 
        ), 
        ), 
        padding: new EdgeInsets.only(
         top: screenWidth/4, 
         bottom: screenWidth/7, 
        ), 
        child: new Column(
         children: <Widget>[ 
         new Stack(
          overflow: Overflow.visible, 
          children: <Widget>[ 
          new CircleAvatar2(
           boxShadow: new BoxShadow(
           color: Colors.white70, 
           spreadRadius: 0.0, 
           blurRadius: 50.0, 
          ), 
           radius: 40.0, 
           backgroundImage: 
            const AssetImage("assets/images/noori.jpg"), 
          ), 
          new Positioned(
           child: new Container(
           padding: const EdgeInsets.all(3.0), 
           decoration: new BoxDecoration(
            borderRadius: new BorderRadius.all(
            const Radius.circular(8.0), 
           ), 
            border: new Border.all(
            color: Colors.white, 
            width: 1.5, 
           ), 
           ), 
           child: new FarsiText(
            "تایید شده", 
            color: Colors.white, 
            fontSize: 15.0, 
           ), 
          ), 
           left: -100.0, 
          ), 
          ], 
         ), 
         ], 
        ), 
       ), 
       ), 
       leading: getAppBarLeading(context), 
      ), 
      ]; 
      }, 
      body: new TabBarView(
      children: <Widget>[ 
       new Center(
       child: new Container(
        height: 1000.0, 
        color: Colors.green.shade200, 
        child: new Center(
        child: new FlutterLogo(colors: Colors.green), 
       ), 
       ), 
      ), 
       new Center(
       child: new Container(
        height: 1000.0, 
        color: Colors.purple.shade200, 
        child: new Center(
        child: new FlutterLogo(colors: Colors.purple), 
       ), 
       ), 
      ), 
      ], 
     ), 
     ), 
    ), 
    ); 

답변

0

나는 최신 버전으로 플러터 업그레이드.

문제가 지속됩니다.

내가 MaterialApp에 대한 ThemeData으로 다음 코드를 사용했다

은 : 지금은 TabBar의를 볼 수 있습니다

primarySwatch: Colors.blue, 

:

primaryColor: Colors.blue[200], 
primaryTextTheme: new TextTheme(
    title: new TextStyle(
    fontSize: 20.0, 
    color: Colors.white, 
), 
), 
primaryIconTheme: new IconThemeData(
    color: Colors.white, 
), 

나는 그것을 대체!

_

관련 문제