flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.5k stars 449 forks source link

Make it possible to change `BottomAppBar`'s border radius #4322

Open ndonkoHenri opened 2 weeks ago

ndonkoHenri commented 2 weeks ago

Implement ClipRRect

Working Flutter Example

```dart import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: HomeScreen(), ); } } class HomeScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( body: Center( child: Text("Content goes here"), ), bottomNavigationBar: ClipRRect( borderRadius: BorderRadius.only( topLeft: Radius.circular(30), topRight: Radius.circular(30), ), child: BottomAppBar( color: Colors.blue, child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ IconButton( icon: Icon(Icons.home, color: Colors.white), onPressed: () {}, ), ], ), ), ), floatingActionButton: FloatingActionButton( onPressed: () {}, child: Icon(Icons.add), ), ); } } ```

Discussed in https://github.com/flet-dev/flet/discussions/4285