Skip to content

Commit a34b55e

Browse files
committed
d
1 parent 0f87db8 commit a34b55e

21 files changed

Lines changed: 1826 additions & 829 deletions
Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
<uses-permission android:name="android.permission.INTERNET" />
3-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
4-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
5-
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
2+
<!-- Internet permission for API calls -->
3+
<uses-permission android:name="android.permission.INTERNET" />
4+
<!-- Storage permissions for file operations -->
5+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
6+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
7+
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
8+
69
<application
7-
android:requestLegacyExternalStorage="true"
8-
android:preserveLegacyExternalStorage="true"
9-
android:label="instachecker"
10+
android:label="InstaChecker"
1011
android:name="${applicationName}"
11-
android:icon="@mipmap/ic_launcher">
12+
android:icon="@mipmap/ic_launcher"
13+
android:usesCleartextTraffic="true">
1214
<activity
1315
android:name=".MainActivity"
1416
android:exported="true"
1517
android:launchMode="singleTop"
16-
android:taskAffinity=""
1718
android:theme="@style/LaunchTheme"
1819
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1920
android:hardwareAccelerated="true"
@@ -26,7 +27,7 @@
2627
android:name="io.flutter.embedding.android.NormalTheme"
2728
android:resource="@style/NormalTheme"
2829
/>
29-
<intent-filter>
30+
<intent-filter android:autoVerify="true">
3031
<action android:name="android.intent.action.MAIN"/>
3132
<category android:name="android.intent.category.LAUNCHER"/>
3233
</intent-filter>
@@ -36,6 +37,17 @@
3637
<meta-data
3738
android:name="flutterEmbedding"
3839
android:value="2" />
40+
41+
<!-- File provider for sharing files -->
42+
<provider
43+
android:name="androidx.core.content.FileProvider"
44+
android:authorities="${applicationId}.fileprovider"
45+
android:exported="false"
46+
android:grantUriPermissions="true">
47+
<meta-data
48+
android:name="android.support.FILE_PROVIDER_PATHS"
49+
android:resource="@xml/file_paths" />
50+
</provider>
3951
</application>
4052
<!-- Required to query activities that can process text, see:
4153
https://developer.android.com/training/package-visibility and
@@ -44,8 +56,8 @@
4456
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
4557
<queries>
4658
<intent>
47-
<action android:name="android.intent.action.PROCESS_TEXT"/>
48-
<data android:mimeType="text/plain"/>
59+
<action android:name="android.intent.action.PROCESS_TEXT" />
60+
<data android:mimeType="text/plain" />
4961
</intent>
5062
</queries>
51-
</manifest>
63+
</manifest>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<paths xmlns:android="http://schemas.android.com/apk/res/android">
3+
<external-files-path name="external_files" path="."/>
4+
<external-cache-path name="external_cache" path="."/>
5+
<files-path name="files" path="."/>
6+
<cache-path name="cache" path="."/>
7+
</paths>

lib/main.dart

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,24 @@
1-
// main.dart
21
import 'package:flutter/material.dart';
3-
import 'package:instachecker/screens/home_screen.dart';
2+
import 'screens/home_screen.dart';
43

54
void main() {
65
runApp(const MyApp());
76
}
87

98
class MyApp extends StatelessWidget {
10-
const MyApp({Key? key}) : super(key: key);
9+
const MyApp({super.key});
1110

1211
@override
1312
Widget build(BuildContext context) {
1413
return MaterialApp(
15-
title: 'InstaChecker',
14+
title: 'Instagram Username Checker',
15+
debugShowCheckedModeBanner: false,
1616
theme: ThemeData(
17-
primarySwatch: Colors.blue,
18-
visualDensity: VisualDensity.adaptivePlatformDensity,
19-
useMaterial3: true,
20-
colorScheme: ColorScheme.fromSeed(
21-
seedColor: Colors.blue,
22-
brightness: Brightness.light,
23-
),
24-
),
25-
darkTheme: ThemeData(
26-
colorScheme: ColorScheme.fromSeed(
27-
seedColor: Colors.blue,
28-
brightness: Brightness.dark,
29-
),
17+
primarySwatch: Colors.indigo,
18+
fontFamily: 'Roboto',
3019
useMaterial3: true,
3120
),
32-
themeMode: ThemeMode.system,
3321
home: const HomeScreen(),
34-
debugShowCheckedModeBanner: false,
3522
);
3623
}
3724
}

lib/models/account_model.dart

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
class AccountModel {
2+
final String username;
3+
final String? password;
4+
final String? authCode;
5+
final String? email;
6+
7+
AccountModel({
8+
required this.username,
9+
this.password,
10+
this.authCode,
11+
this.email,
12+
});
13+
14+
factory AccountModel.fromJson(Map<String, dynamic> json) {
15+
return AccountModel(
16+
username: json['username'] ?? '',
17+
password: json['password'],
18+
authCode: json['auth_code'],
19+
email: json['email'],
20+
);
21+
}
22+
23+
Map<String, dynamic> toJson() {
24+
return {
25+
'username': username,
26+
'password': password,
27+
'auth_code': authCode,
28+
'email': email,
29+
};
30+
}
31+
}
32+
33+
class CheckResult {
34+
final String username;
35+
final String status;
36+
final String message;
37+
38+
CheckResult({
39+
required this.username,
40+
required this.status,
41+
required this.message,
42+
});
43+
44+
factory CheckResult.fromJson(Map<String, dynamic> json) {
45+
return CheckResult(
46+
username: json['username'] ?? '',
47+
status: json['status'] ?? '',
48+
message: json['message'] ?? '',
49+
);
50+
}
51+
}
52+
53+
class ProcessingStats {
54+
final int activeCount;
55+
final int availableCount;
56+
final int errorCount;
57+
final int cancelledCount;
58+
final int totalCount;
59+
60+
ProcessingStats({
61+
required this.activeCount,
62+
required this.availableCount,
63+
required this.errorCount,
64+
required this.cancelledCount,
65+
required this.totalCount,
66+
});
67+
68+
factory ProcessingStats.fromJson(Map<String, dynamic> json) {
69+
return ProcessingStats(
70+
activeCount: json['active_count'] ?? 0,
71+
availableCount: json['available_count'] ?? 0,
72+
errorCount: json['error_count'] ?? 0,
73+
cancelledCount: json['cancelled_count'] ?? 0,
74+
totalCount: json['total_count'] ?? 0,
75+
);
76+
}
77+
78+
int get processedCount => activeCount + availableCount + errorCount + cancelledCount;
79+
80+
double get progress => totalCount > 0 ? processedCount / totalCount : 0.0;
81+
}

lib/screens/converter_tab.dart

Lines changed: 0 additions & 149 deletions
This file was deleted.

0 commit comments

Comments
 (0)