In flutter, everything is a widget.
runApp() function's return type is a widget and its parameter is also a widget.
Example:
import 'package:flutter/material.dart';
void main() {
runApp(
const Center(
child: Text(
'Hello World',
textDirection: TextDirection.ltr,
),
),
);
}
Video Link: