Skip to content

Instantly share code, notes, and snippets.

@justinmc
Created February 21, 2025 20:57
Show Gist options
  • Save justinmc/149db13537faef5692b66db2882fc3cb to your computer and use it in GitHub Desktop.
Save justinmc/149db13537faef5692b66db2882fc3cb to your computer and use it in GitHub Desktop.
Demonstrates that SelectableText focus bugs don't happen with SelectionArea instead
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Flutter Demo',
home: Scaffold(
body: SelectionArea(
child: Text('This is selectable text'),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment