Skip to content

Instantly share code, notes, and snippets.

@Aldo111
Created Jun 19, 2021
Embed
What would you like to do?
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