Ozodbek
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 8/100
- issue の種類
- ドキュメント
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- dart
調査の方向性
The report names the install page, sites/docs/src/content/install/index.md, but states no problem; the body is a pasted Dart/Flutter demo app with a title of 'Ozodbek'. Start by checking that page against the Flutter install steps, then ask the reporter what is wrong with it before editing. Done means the reporter confirms the specific problem and a fix to that page is merged.
索引モデルが issue の本文から書いたものです。
説明
Page URL
https://docs.flutter.dev/install
Page source
https://github.com/flutter/website/blob/main/sites/docs/src/content/install/index.md
Describe the problem
import 'package:flutter/material.dart';
void main() {
runApp(const Med3DApp());
}
class Med3DApp extends StatelessWidget {
const Med3DApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Med3D AI',
theme: ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: const Color(0xFFB32635),
),
),
home: const MainPage(),
);
}
}
class MainPage extends StatefulWidget {
const MainPage({super.key});
@override
State createState() => _MainPageState();
}
class _MainPageState extends State {
int selectedIndex = 0;
final pages = const [
HomePage(),
TutorPage(),
QuizPage(),
BmiPage(),
];
@override
Widget build(BuildContext context) {
return Scaffold(
body: IndexedStack(
index: selectedIndex,
children: pages,
),
bottomNavigationBar: NavigationBar(
selectedIndex: selectedIndex,
onDestinationSelected: (i) {
setState(() => selectedIndex = i);
},
destinations: const [
NavigationDestination(
icon: Icon(Icons.home_outlined),
label: 'Bosh sahifa',
),
NavigationDestination(
icon: Icon(Icons.psychology_alt_outlined),
label: 'AI Tutor',
),
NavigationDestination(
icon: Icon(Icons.quiz_outlined),
label: 'Testlar',
),
NavigationDestination(
icon: Icon(Icons.calculate_outlined),
label: 'BMI',
),
],
),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
final subjects = const [
'Anatomiya',
'Fiziologiya',
'Patofiziologiya',
'Patologik anatomiya',
'Farmakologiya',
'Radiologiya',
'Ichki kasalliklar',
'Pediatriya',
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(
'Med3D AI',
style: TextStyle(fontWeight: FontWeight.bold),
),
),
body: ListView(
padding: const EdgeInsets.all(16),
children: [
Container(
padding: const EdgeInsets.all(22),
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [
Color(0xFF8E1B2B),
Color(0xFFD94B5B),
],
),
borderRadius: BorderRadius.circular(24),
),
child: const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(
Icons.favorite,
color: Colors.white,
size: 42,
),
SizedBox(height: 12),
Text(
'Kelajak shifokorlari uchun!',
style: TextStyle(
color: Colors.white,
fontSize: 23,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 8),
Text(
'O‘rganing, tushuning, amalda qo‘llang.',
style: TextStyle(color: Colors.white),
),
],
),
),
const SizedBox(height: 24),
const Text(
'Tibbiy fanlar',
style: TextStyle(
fontSize: 21,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 10),
...subjects.map(
(subject) => Card(
child: ListTile(
leading: const CircleAvatar(
child: Icon(Icons.menu_book),
),
title: Text(subject),
trailing: const Icon(Icons.chevron_right),
onTap: () {
showDialog(
context: context,
builder: (context) => AlertDialog(
title: Text(subject),
content: const Text(
'Mavzuni o‘rganish rejasi:\n\n'
'1. Ta’rif\n'
'2. Sabablari\n'
'3. Rivojlanish mexanizmi\n'
'4. Klinik belgilar\n'
'5. Diagnostika va davolash',
),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: const Text('Yopish'),
),
],
),
);
},
),
),
),
const SizedBox(height: 16),
const Text(
'Med3D AI — tibbiy ta’lim uchun o‘quv prototipi.',
style: TextStyle(color: Colors.grey),
),
],
),
);
}
}
class TutorPage extends StatefulWidget {
const TutorPage({super.key});
@override
State createState() => _TutorPageState();
}
class _TutorPageState extends State {
final controller = TextEditingController();
final messages = [
'Salom! Men Med3D AI demo yordamchisiman. '
'Yurak, anatomiya yoki boshqa tibbiy mavzu haqida savol bering.',
];
String answer(String question) {
final q = question.toLowerCase();
if (q.contains('yurak')) {
return 'Yurak to‘rt bo‘limdan iborat: '
'o‘ng bo‘lmacha, o‘ng qorincha, chap bo‘lmacha '
'va chap qorincha. O‘ng tomon qonni o‘pkaga, '
'chap tomon esa katta qon aylanish doirasiga haydaydi.';
}
if (q.contains('osteomiyelit') ||
q.contains('osteomielit')) {
return 'Osteomiyelit — suyak va suyak iligining '
'infeksion yallig‘lanishi. Belgilariga og‘riq, '
'shish va isitma kirishi mumkin. Tashxis shifokor '
'ko‘rigi va tekshiruvlar asosida qo‘yiladi.';
}
if (q.contains('qon')) {
return 'Qon plazma va shaklli elementlardan iborat. '
'Eritrotsitlar kislorod tashiydi, leykotsitlar '
'immun himoyada qatnashadi, trombotsitlar '
'esa qon ivishida muhim rol o‘ynaydi.';
}
return 'Bu versiyada javoblar cheklangan demo '
'ma’lumotlariga asoslanadi. Haqiqiy AI javoblarini '
'olish uchun keyinchalik AI xizmatini xavfsiz '
'server orqali ulashimiz kerak.';
}
void send() {
final question = controller.text.trim();
if (question.isEmpty) return;
setState(() {
messages.add('Siz: $question');
messages.add('Med3D AI: ${answer(question)}');
controller.clear();
});
}
@override
void dispose() {
controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('AI Tutor')),
body: Column(
children: [
Expanded(
child: ListView.builder(
padding: const EdgeInsets.all(12),
itemCount: messages.length,
itemBuilder: (context, index) => Card(
child: Padding(
padding: const EdgeInsets.all(14),
child: Text(messages[index]),
),
),
),
),
SafeArea(
child: Padding(
padding: const EdgeInsets.all(10),
child: Row(
children: [
Expanded(
child: TextField(
controller: controller,
onSubmitted: (_) => send(),
decoration: const InputDecoration(
hintText: 'Savolingizni yozing...',
border: OutlineInputBorder(),
),
),
),
const SizedBox(width: 8),
IconButton.filled(
onPressed: send,
icon: const Icon(Icons.send),
),
],
),
),
),
],
),
);
}
}
class QuizPage extends StatefulWidget {
const QuizPage({super.key});
@override
State createState() => _QuizPageState();
}
class _QuizPageState extends State {
int question = 0;
int score = 0;
int? selected;
final questions = const [
{
'q': 'Yurak nechta bo‘limdan iborat?',
'a': ['2 ta', '3 ta', '4 ta', '5 ta'],
'correct': 2,
},
{
'q': 'Qonni kislorod bilan kim tashiydi?',
'a': ['Trombotsit', 'Eritrotsit', 'Leykotsit', 'Plazma'],
'correct': 1,
},
{
'q': 'Yurakning tabiiy ritm boshlovchisi?',
'a': ['Sinus tuguni', 'Mitral klapan', 'Aorta', 'Perikard'],
'correct': 0,
},
];
void next() {
if (selected == null) return;
if (selected == questions[question]['correct']) {
score++;
}
if (question == questions.length - 1) {
showDialog(
context: context,
builder: (context) => AlertDialog(
title: const Text('Test natijasi'),
content: Text('$score / ${questions.length} ta to‘g‘ri!'),
actions: [
TextButton(
onPressed: () {
Navigator.pop(context);
setState(() {
question = 0;
score = 0;
selected = null;
});
},
child: const Text('Qayta boshlash'),
),
],
),
);
} else {
setState(() {
question++;
selected = null;
});
}
}
@override
Widget build(BuildContext context) {
final item = questions[question];
final answers = item['a'] as List;
return Scaffold(
appBar: AppBar(title: const Text('Tibbiy testlar')),
body: ListView(
padding: const EdgeInsets.all(16),
children: [
Text('Savol ${question + 1} / ${questions.length}'),
const SizedBox(height: 20),
Text(
item['q'] as String,
style: const TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 16),
...List.generate(
answers.length,
(i) => Card(
child: RadioListTile<int>(
value: i,
groupValue: selected,
title: Text(answers[i]),
onChanged: (value) {
setState(() => selected = value);
},
),
),
),
const SizedBox(height: 12),
FilledButton(
onPressed: selected == null ? null : next,
child: const Text('Keyingi savol'),
),
],
),
);
}
}
class BmiPage extends StatefulWidget {
const BmiPage({super.key});
@override
State createState() => _BmiPageState();
}
class _BmiPageState extends State {
final heightController = TextEditingController();
final weightController = TextEditingController();
String result = '';
void calculate() {
final height = double.tryParse(
heightController.text.replaceAll(',', '.'),
);
final weight = double.tryParse(
weightController.text.replaceAll(',', '.'),
);
if (height == null ||
weight == null ||
height <= 0 ||
weight <= 0) {
setState(() => result = 'Bo‘y va vaznni to‘g‘ri kiriting.');
return;
}
final meters = height > 3 ? height / 100 : height;
final bmi = weight / (meters * meters);
final category = bmi < 18.5
? 'Vazn yetishmasligi'
: bmi < 25
? 'Me’yor oralig‘i'
: bmi < 30
? 'Ortiqcha vazn'
: 'Semizlik diapazoni';
setState(() {
result = 'BMI: ${bmi.toStringAsFixed(1)}\n$category';
});
}
@override
void dispose() {
heightController.dispose();
weightController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('BMI kalkulyator')),
body: ListView(
padding: const EdgeInsets.all(16),
children: [
const Text(
'Tana vazni indeksini hisoblash',
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 20),
TextField(
controller: heightController,
keyboardType: const TextInputType.numberWithOptions(
decimal: true,
),
decoration: const InputDecoration(
labelText: 'Bo‘y (172 sm yoki 1.72 m)',
border: OutlineInputBorder(),
),
),
const SizedBox(height: 12),
TextField(
controller: weightController,
keyboardType: const TextInputType.numberWithOptions(
decimal: true,
),
decoration: const InputDecoration(
labelText: 'Vazn (kg)',
border: OutlineInputBorder(),
),
),
const SizedBox(height: 16),
FilledButton(
onPressed: calculate,
child: const Text('Hisoblash'),
),
const SizedBox(height: 16),
if (result.isNotEmpty)
Card(
child: Padding(
padding: const EdgeInsets.all(18),
child: Text(
result,
style: const TextStyle(fontSize: 20),
),
),
),
const Text(
'BMI — skrining ko‘rsatkichi, yakka o‘zi tashxis emas.',
style: TextStyle(color: Colors.grey),
),
],
),
);
}
}
Expected fix
No response
Additional context
No response
I would like to fix this problem.
- I will try and fix this problem on docs.flutter.dev.
- 主要言語
- Dart
- スター
- 3.1k
- フォーク
- 3.5k
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 51
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
flutter/website のほかの issue
-
a.tut.codelab-google fix.code-sample fix.link fix.typo from.flutter-sdk p2-medium
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
flutter/website#13967 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Need dev info for running on iOS対応中かも @poyito777 が 16 日前に担当しました。 オープンfrom.page-issue p2-medium
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Missing download link on install page対応中かも @conooi が 15 日前に担当しました。 オープンfrom.page-issue p1-high
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
flutter/website#13540 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
At step 5th in `Get to know Firebase for Flutter` codelabs, the screenshot is not synced with codeオープンa.tut.codelab-google p2-medium
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
flutter/website#13816 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
a.rn.release-notes d.enhancement e1-hours fix.typo from.team p2-medium t.a11y target.web
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
flutter/website の issue をすべて見る
似ている issue
-
c: proposal p: go_router package team-ecosystem
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
flutter/flutter#194542 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
famedly/matrix-dart-sdk#2524 ·
メンテナーはふだん 1 日以内に返信
-
Documentation
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Kazakh (kk_KZ) and Georgian (ka_GE) system locales get English instead of the shipped translationsオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
area: docs eco: dart good first issue help wanted lane: free-agent roadmap size: XS type: docs
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
arminazimi/evergreen#430 ·
メンテナーはふだん 1 日以内に返信