my question is about global variables. I think I have never seen variables declared outside of classes. My question is: why?
For my small projects I often created variables simply like that:
import 'package:flutter/material.dart';
String title = 'this is title';
String userName = '';
StatefulWidget...
It always worked for me to easy use them