CH-J SM MobileSSH کے ذریعے سرور کا انتظام
مینو
شائع شدہ سورس

CH-J SM Mobile

ایپلیکیشن کی کسی مخصوص ریلیز کی ڈائریکٹریز اور فائلیں دیکھیں۔

سورس ZIP ڈاؤن لوڈ کریں
CH-J / SM Mobile 175 فائلیں
sm-mobile-20261016T185235Z-8e93ecc1b59a شامل کیا گیا: · بلڈ کیا گیا:
common.dart شامل کیا گیا: تاریخ درج نہیں 2.7 KB · 99 لائنیں
کوڈ فائل ڈاؤن لوڈ کریں
1import 'package:flutter/material.dart';
2import '../l10n/strings.dart';
3import '../services/ssh_service.dart';
5void showFailure(BuildContext context, Object error) {
6 if (!context.mounted) return;
7 ScaffoldMessenger.of(context).showSnackBar(
8 SnackBar(
9 content: Text(context.tr(failureCode(error))),
10 duration: const Duration(seconds: 8),
11 ),
12 );
15Future<bool> confirm(
16 BuildContext context,
17 String key, {
18 String? detail,
19}) async =>
20 await showDialog<bool>(
21 context: context,
22 builder: (ctx) => AlertDialog(
23 title: Text(ctx.tr(key)),
24 content: detail == null ? null : SelectableText(detail),
25 actions: [
26 TextButton(
27 onPressed: () => Navigator.pop(ctx, false),
28 child: Text(ctx.tr('cancel')),
29 ),
30 FilledButton(
31 onPressed: () => Navigator.pop(ctx, true),
32 child: Text(ctx.tr('continueAction')),
33 ),
34 ],
35 ),
36 ) ??
37 false;
38Future<String?> askName(
39 BuildContext context,
40 String title, {
41 String initial = '',
42}) async {
43 final field = TextEditingController(text: initial);
44 final result = await showDialog<String>(
45 context: context,
46 builder: (ctx) => AlertDialog(
47 title: Text(ctx.tr(title)),
48 content: TextField(
49 controller: field,
50 autofocus: true,
51 decoration: InputDecoration(labelText: ctx.tr('name')),
52 ),
53 actions: [
54 TextButton(
55 onPressed: () => Navigator.pop(ctx),
56 child: Text(ctx.tr('cancel')),
57 ),
58 FilledButton(
59 onPressed: () => Navigator.pop(ctx, field.text),
60 child: Text(ctx.tr('save')),
61 ),
62 ],
63 ),
64 );
65 Future.delayed(const Duration(seconds: 1), field.dispose);
66 return result;
69class PageMessage extends StatelessWidget {
70 final String label;
71 final IconData icon;
72 const PageMessage(this.label, {this.icon = Icons.dns_outlined, super.key});
73 @override
74 Widget build(BuildContext context) => LayoutBuilder(
75 // Centered when it fits, scrollable in short windows.
76 builder: (context, constraints) => SingleChildScrollView(
77 child: ConstrainedBox(
78 constraints: BoxConstraints(minHeight: constraints.maxHeight),
79 child: Center(
80 child: Padding(
81 padding: const EdgeInsets.all(28),
82 child: Column(
83 mainAxisSize: MainAxisSize.min,
84 children: [
85 Icon(
86 icon,
87 size: 48,
88 color: Theme.of(context).colorScheme.primary,
89 ),
90 const SizedBox(height: 20),
91 Text(context.tr(label), textAlign: TextAlign.center),
92 ],
93 ),
94 ),
95 ),
96 ),
97 ),
98 );
SHA-25622cbc589cf440176c8e10aa44fa50ac468e5e5a355d87c765077050a28771c9f

CH-J Proprietary Software License 1.14 · سورس CH-J Proprietary Software License 1.14 کے تحت فراہم کیا جاتا ہے۔ اس کی دستیابی لائسنس کی شرائط نہیں بدلتی اور نہ ہی اضافی حقوق دیتی ہے۔

آرکائیو کا SHA-25646e427a43e87af091004f36145590bda8fe90086dfb0f631afeb5029fb0b5655
فائلیں