Ozodbek
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 8/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- dart
- Lĩnh vực
- documentation
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Dart
- Star
- 3.1k
- Fork
- 3.5k
- Merge trung bình
- 3 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 46
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của flutter/website
-
act.await-dev-pr d.enhancement e0-minutes p2-medium t.cli-tools t.i18n t.l10n
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
a.tut.codelab-google fix.code-sample fix.link fix.typo from.flutter-sdk p2-medium
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
flutter/website#13967 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
At step 5th in `Get to know Firebase for Flutter` codelabs, the screenshot is not synced with codeĐang mởa.tut.codelab-google p2-medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
flutter/website#13816 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[iPhone Duo] Update website documentation to report correct display size when switching screensCó thể đã có người làm @hellohuanlin đã nhận 1 ngày trước. Đang mở
flutter/website#14015 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
act.await-dev-pr co.request d.new-feature devos.macOS e1-hours ed.xcode p2-medium t.cli-tools target.iOS target.macOS
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 54/100
flutter/website#13998 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của flutter/website
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Tencent/tdesign-flutter#1229 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
VeryGoodOpenSource/very_good_analysis#254 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
berkmancenter/frankly#732 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rodydavis/signals.dart#510 ·