CopyPastor

Detecting plagiarism made easy.

Score: 0.8046321868896484; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2025-01-15
by KIRAx2000

Original Post

Original - Posted on 2020-04-05
by Sanket Vekariya



            
Present in both answers; Present only in the new answer; Present only in the old answer;

I've been struggling for some time to achieve it; I know it is too late, but to help those who will come.
Here is the following approach I made and it worked like a charm.
[![enter image description here][1]][1]

background: Stack( fit: StackFit.expand, children: [ CustomNetworkImage(imageUrl: "https://static.mubasher.info/File.Story_Image/edaffba12626fb56d0144d9a3087ffb6/1024.jpg"), AnimatedOpacity( duration: Duration(milliseconds: 300), opacity: toHide ? 0.0 : 1.0, child: Align( alignment: Alignment.topCenter, child: SafeArea( child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Padding( padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 10), child: AppBarBackButtonIcon(backgroundColor: AppColors.lightGray2), ), Padding( padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 10), child: SearchButtonIcon( backgroundColor: AppColors.lightGray2, onPressed: () {}, ), ), ], ), ), ), ), Positioned( bottom: 0, right: 0, left: 0, child: Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only(topLeft: const Radius.circular(20.0), topRight: const Radius.circular(20.0))), child: const SizedBox(height: 20), ), ), ], ),

[1]: https://i.sstatic.net/V075NQwt.png
CustomScrollView( slivers: <Widget>[ SliverAppBar( title: Text('Test'), ), SliverList( delegate: SliverChildBuilderDelegate( (BuildContext context, int index) { return Container( child: Container( child: Column( children: <Widget>[ Container( child: Text( 'Index is $index'.toUpperCase(), ), alignment: Alignment.centerLeft, padding: EdgeInsets.only(bottom: 10.0), ), Container(height: 200.0) ], ), constraints: BoxConstraints.tightForFinite(width: 200), decoration: BoxDecoration( color: index % 2 == 0 ? Color(0XFF45766E) : Color(0XFFECB141), borderRadius: BorderRadius.only( topLeft: Radius.circular(40.0), topRight: Radius.circular(40.0), ), ), padding: EdgeInsets.only( left: 20.0, top: 10.0, ), ), decoration: BoxDecoration( //the only change required here color: index % 2 == 0 ? index == 0 ? Colors.white : Color(0XFFECB141) : Color(0XFF45766E), ), ); }, ), ), ], ); You just need to change explicitly for the first position.

        
Present in both answers; Present only in the new answer; Present only in the old answer;