Created
June 19, 2021 21:04
-
-
Save Aldo111/458eb9c888f38e4d5d28d6979d680ad3 to your computer and use it in GitHub Desktop.
Visual effect of 2 sections of content curving seamlessly into each other at opposite ends of their border
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
const primaryColor = Color(0xFFFDFDFD); | |
const secondaryColor = Color(0xFF252525); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
title: 'Flutter Demo', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
), | |
home: Column( | |
children: [ | |
Expanded( | |
child: Stack( | |
children: [ | |
Container(color: secondaryColor), | |
Container( | |
decoration: BoxDecoration( | |
color: primaryColor, | |
borderRadius: BorderRadius.only( | |
bottomLeft: Radius.circular(88)))), | |
], | |
), | |
), | |
Container( | |
height: 200, | |
child: Stack( | |
children: [ | |
Container(color: primaryColor), | |
Container( | |
decoration: BoxDecoration( | |
color: secondaryColor, | |
borderRadius: BorderRadius.only( | |
topRight: Radius.circular(88)))), | |
], | |
), | |
), | |
], | |
)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment