> For the complete documentation index, see [llms.txt](https://meulencv.gitbook.io/flutter-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://meulencv.gitbook.io/flutter-documentation/widgets/text/rounded-background-text.md).

# Rounded background text

Text with a rounded background, also it has margin in the background colour of the text

Highlight a simple text:

> You need to import the package
>
> ```
> import 'package:rounded_background_text/rounded_background_text.dart';
> ```

```dart
RoundedBackgroundText(
  'A cool text to be highlighted',
  style: const TextStyle(fontWeight: FontWeight.bold),
  backgroundColor: Colors.white,
),
```

You can change the radius of the corners by setting `innerRadius` and `outerRadius`:

```dart
RoundedBackgroundText(
  'A cool text to be highlighted',
  style: const TextStyle(fontWeight: FontWeight.bold),
  backgroundColor: Colors.white,
  innerRadius: 15.0,
  outerRadius: 10.0,
),
```

More info in <https://flutterawesome.com/text-and-textfield-highlighted-with-rounded-corners/><br>
