Skip to content

Instantly share code, notes, and snippets.

@Aldo111
Created June 19, 2021 21:04
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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
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