50 lines
1.4 KiB
Dart
50 lines
1.4 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../ui/adaptive/host.dart';
|
|
import 'destination.dart';
|
|
|
|
/// The detail pane beside a list before anything is chosen: the
|
|
/// destination's own icon above one short muted line, centred. One look for
|
|
/// Runs, Chat and Pipelines.
|
|
class EmptyDetailPane extends StatelessWidget {
|
|
const EmptyDetailPane({
|
|
super.key,
|
|
required this.destination,
|
|
required this.message,
|
|
});
|
|
|
|
final AppDestination destination;
|
|
final String message;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final cupertino = usesCupertinoHost(context);
|
|
final details = destinationDetails(destination);
|
|
final color = cupertino
|
|
? CupertinoColors.secondaryLabel.resolveFrom(context)
|
|
: Theme.of(context).colorScheme.onSurfaceVariant;
|
|
return Center(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(24),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Icon(
|
|
cupertino ? details.cupertinoIcon : details.icon,
|
|
size: 32,
|
|
color: color,
|
|
),
|
|
const SizedBox(height: 12),
|
|
Text(
|
|
message,
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(color: color),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|