build method
- BuildContext context
override
Builds the widget tree for the TransferScreen.
This method builds a widget tree for the TransferScreen. It returns a Scaffold widget with a background color set to Constants.backColor. The body of the scaffold is a Center widget that contains a Column widget. The Column widget has its mainAxisAlignment set to MainAxisAlignment.center. It contains three children: a Text widget displaying the transferName, a Text widget with the text "Transfer in Progress", and a SizedBox widget with a height of 32. The SizedBox widget is followed by a Center widget that contains an Icon widget with the icon Icons.cloud_download_rounded, its color set to Constants.highlightColor, and its size set to 200.
Returns: The widget tree for the TransferScreen.
Implementation
@override
/// Builds the widget tree for the TransferScreen.
///
/// This method builds a widget tree for the TransferScreen. It returns a
/// Scaffold widget with a background color set to Constants.backColor. The
/// body of the scaffold is a Center widget that contains a Column widget.
/// The Column widget has its mainAxisAlignment set to MainAxisAlignment.center.
/// It contains three children: a Text widget displaying the transferName, a
/// Text widget with the text "Transfer in Progress", and a SizedBox widget
/// with a height of 32. The SizedBox widget is followed by a Center widget
/// that contains an Icon widget with the icon Icons.cloud_download_rounded,
/// its color set to Constants.highlightColor, and its size set to 200.
///
/// Returns:
/// The widget tree for the TransferScreen.
Widget build(BuildContext context) {
return Scaffold(
// Set the background color of the Scaffold widget.
backgroundColor: Constants.backColor,
body: Center(
// The body of the Scaffold widget.
child: Column(
// The Column widget has its mainAxisAlignment set to
// MainAxisAlignment.center.
mainAxisAlignment: MainAxisAlignment.center,
children: [
// A Text widget displaying the transferName.
Text(
widget.transferName,
style: const TextStyle(
color: Colors.white,
fontSize: 24,
),
),
// A Text widget with the text "Transfer in Progress".
Text("Transfer in Progress"),
// A SizedBox widget with a height of 32.
const SizedBox(height: 32),
// A Center widget containing an Icon widget.
const Center(
child: Icon(
Icons.cloud_download_rounded,
color: Constants.highlightColor,
size: 200,
),
),
],
),
),
);
}