Execute Step 7 of the GenUI Workshop, creating the weather card widget and fake forecast data.
npx skills add https://github.com/flutter/demos --skill genui_workshop_step_7
Goal: Execute Step 7 of the GenUI workshop.
Instructions:
Use your code editing tools to create the weather card catalog widget, fake forecast data, and update the app's configuration.
lib/catalog/weather_card.dart:import 'package:flutter/material.dart';
import 'package:genui/genui.dart';
import 'package:json_schema_builder/json_schema_builder.dart';
final forecastSchema = S.object(
properties: {
'area_name': S.string(),
'current_condition': S.object(
properties: {
"temp_C": S.number(),
"temp_F": S.number(),
"humidity": S.number(),
"observation_time": S.string(),
},
),
'weatherDesc': S.string(),
'weatherIconUrl': S.string(),
},
);
final weatherCard = CatalogItem(
name: 'WeatherCard',
dataSchema: forecastSchema,
widgetBuilder: (itemContext) {
return WeatherCard(data: itemContext.data as Map<String, Object?>);
},
);
class WeatherCard extends StatelessWidget {
final Map<String, Object?> data;
const WeatherCard({super.key, required this.data});
@override
Widget build(BuildContext context) {
final currentCondition = data["current_condition"] as Map<String, Object?>;
return Container(
width: 500,
padding: const EdgeInsets.all(20),
child: Card(
elevation: 4,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
child: Padding(
padding: const EdgeInsets.all(24.0),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
"Observed at ${currentCondition["observation_time"]}",
style: TextStyle(fontSize: 12),
),
],
),
const SizedBox(height: 8),
Row(
children: [
Image.network(
data["weatherIconUrl"].toString(),
errorBuilder: (context, err, trace) {
return Icon(Icons.wb_sunny, size: 32,);
},
),
const SizedBox(width: 16),
Text(
data["area_name"].toString(),
style: TextStyle(fontSize: 28, fontWeight: FontWeight.bold),
),
],
),
const SizedBox(height: 24),
Row(
children: [
Text(
currentCondition["temp_C"]!.toString(),
style: TextStyle(fontSize: 56, fontWeight: FontWeight.bold),
),
SizedBox(width: 8),
Text(
"°C",
style: TextStyle(fontSize: 32, fontWeight: FontWeight.w500),
),
],
),
const SizedBox(height: 16),
Row(
children: [
const SizedBox(width: 16),
Text(
currentCondition['temp_F'].toString(),
style: TextStyle(fontSize: 28, fontWeight: FontWeight.w500),
),
SizedBox(width: 8),
Text(
"°F",
style: TextStyle(fontSize: 20, color: Colors.grey),
),
],
),
const SizedBox(height: 16),
Text("${data['weatherDesc']}", style: TextStyle(fontSize: 22)),
],
),
),
),
);
}
}
lib/catalog/fake_forecast.dart:var fakeForecast = {
'area_name': 'Baltimore (Mount Clare)',
'current_condition': {
'temp_C': 22,
'temp_F': 72,
'humidity': 61,
'observation_time': '02:25 PM',
},
'weatherDesc': ' Sunny',
'weatherIconUrl':
'https://cdn.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0001_sunny.png',
};
lib/main.dart to import the new catalog item and add it to BasicCatalogItems.asCatalog().copyWith(...):Add this import at the top:
import 'package:genui_workshop/catalog/weather_card.dart';
And in initState, modify catalog = BasicCatalogItems.asCatalog().copyWith(newItems: [weatherInput]); to include the weatherCard:
catalog = BasicCatalogItems.asCatalog().copyWith(
newItems: [weatherInput, weatherCard],
);
Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take flutter/genui_workshop_step_7 from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.