Skip to content

Commit 97d61c7

Browse files
committed
Update Flutter SDK version to 3.29.0 and add device preview configuration files
1 parent 15086c5 commit 97d61c7

File tree

395 files changed

+58290
-314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

395 files changed

+58290
-314
lines changed

.fvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"flutter": "3.24.3"
2+
"flutter": "3.29.0"
33
}

.github/workflows/deploy_live_preview.yml

Lines changed: 260 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,266 @@ jobs:
3838
with:
3939
flutter-version: "3.24.4" #. Specify the Flutter version
4040
channel: "stable"
41-
4241
- name: Install dependencies
4342
run: |
43+
flutter clean
4444
flutter pub get
4545
flutter pub add device_preview
4646
flutter pub add device_preview_screenshot
47+
flutter pub add font_awesome_flutter
48+
flutter pub get url_launcher
4749
flutter pub get
4850
51+
- name: Update device_preview_button.dart for preview
52+
run: |
53+
# Ensure we're creating a fresh main.dart
54+
cat > lib/device_preview_button.dart << 'EOL'
55+
import 'package:device_preview/device_preview.dart';
56+
import 'package:flutter/material.dart';
57+
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
58+
import 'package:url_launcher/url_launcher.dart';
59+
60+
class CustomPlugin extends StatelessWidget {
61+
final String authorDescription;
62+
final String? sourceCodeUrl;
63+
final String? apkDownloadUrl;
64+
final Color themeColor;
65+
66+
const CustomPlugin({
67+
super.key,
68+
this.authorDescription = "Flutter Developer",
69+
this.sourceCodeUrl,
70+
this.apkDownloadUrl,
71+
this.themeColor = const Color(0xFF2196F3),
72+
});
73+
74+
@override
75+
Widget build(BuildContext context) {
76+
return ToolPanelSection(
77+
title: 'Auther and Project INFO',
78+
children: [
79+
Container(
80+
decoration: BoxDecoration(
81+
color: themeColor.withOpacity(0.05),
82+
borderRadius: BorderRadius.circular(12),
83+
),
84+
child: Column(
85+
children: [
86+
_buildAuthorSection(),
87+
_buildActionSection(),
88+
],
89+
),
90+
),
91+
],
92+
);
93+
}
94+
95+
Widget _buildActionButton({
96+
required IconData icon,
97+
required String label,
98+
required VoidCallback onPressed,
99+
bool isPrimary = false,
100+
}) {
101+
return ElevatedButton(
102+
onPressed: onPressed,
103+
style: ElevatedButton.styleFrom(
104+
backgroundColor: isPrimary ? themeColor : themeColor.withOpacity(0.1),
105+
foregroundColor: isPrimary ? Colors.white : themeColor,
106+
padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 12),
107+
shape: RoundedRectangleBorder(
108+
borderRadius: BorderRadius.circular(8),
109+
),
110+
elevation: isPrimary ? 2 : 0,
111+
),
112+
child: Row(
113+
mainAxisAlignment: MainAxisAlignment.center,
114+
children: [
115+
Icon(
116+
icon,
117+
size: 20,
118+
color: isPrimary ? Colors.white : themeColor,
119+
),
120+
const SizedBox(width: 8),
121+
Text(
122+
label,
123+
style: const TextStyle(
124+
fontSize: 14,
125+
fontWeight: FontWeight.w600,
126+
),
127+
),
128+
],
129+
),
130+
);
131+
}
132+
133+
Widget _buildActionSection() {
134+
return Container(
135+
padding: const EdgeInsets.all(16),
136+
child: Row(
137+
children: [
138+
if (sourceCodeUrl != null)
139+
Expanded(
140+
child: _buildActionButton(
141+
icon: Icons.code,
142+
label: 'Source Code',
143+
onPressed: () => _launchUrl(sourceCodeUrl!),
144+
),
145+
),
146+
if (sourceCodeUrl != null && apkDownloadUrl != null)
147+
const SizedBox(width: 12),
148+
if (apkDownloadUrl != null)
149+
Expanded(
150+
child: _buildActionButton(
151+
icon: Icons.download,
152+
label: 'Download APK',
153+
onPressed: () => _launchUrl(apkDownloadUrl!),
154+
isPrimary: true,
155+
),
156+
),
157+
],
158+
),
159+
);
160+
}
161+
162+
Widget _buildAuthorSection() {
163+
return Container(
164+
padding: const EdgeInsets.all(16),
165+
decoration: BoxDecoration(
166+
color: themeColor.withOpacity(0.1),
167+
borderRadius: const BorderRadius.only(
168+
topLeft: Radius.circular(12),
169+
topRight: Radius.circular(12),
170+
),
171+
),
172+
child: Column(
173+
crossAxisAlignment: CrossAxisAlignment.start,
174+
children: [
175+
Row(
176+
children: [
177+
CircleAvatar(
178+
backgroundColor: themeColor,
179+
radius: 24,
180+
child: const Text(
181+
'HK',
182+
style: TextStyle(
183+
color: Colors.white,
184+
fontWeight: FontWeight.bold,
185+
),
186+
),
187+
),
188+
const SizedBox(width: 12),
189+
Expanded(
190+
child: Column(
191+
crossAxisAlignment: CrossAxisAlignment.start,
192+
children: [
193+
Text(
194+
'Harshit Khandelwal',
195+
style: TextStyle(
196+
fontSize: 18,
197+
fontWeight: FontWeight.bold,
198+
color: themeColor,
199+
),
200+
),
201+
Text(
202+
authorDescription,
203+
style: TextStyle(
204+
fontSize: 14,
205+
color: Colors.grey[600],
206+
),
207+
),
208+
],
209+
),
210+
),
211+
],
212+
),
213+
const SizedBox(height: 16),
214+
_buildSocialButtons(),
215+
],
216+
),
217+
);
218+
}
219+
220+
Widget _buildSocialButtons() {
221+
return Wrap(
222+
spacing: 8,
223+
runSpacing: 8,
224+
alignment: WrapAlignment.center,
225+
children: [
226+
_buildSocialLink(
227+
icon: FontAwesomeIcons.globe,
228+
label: 'Portfolio',
229+
url: 'https://harshit2756.github.io/portfolio/',
230+
),
231+
_buildSocialLink(
232+
icon: FontAwesomeIcons.github,
233+
label: 'GitHub',
234+
url: 'https://github.com/Harshit2756',
235+
),
236+
_buildSocialLink(
237+
icon: FontAwesomeIcons.twitter,
238+
label: 'Twitter',
239+
url: 'https://twitter.com/Harshit2756',
240+
),
241+
_buildSocialLink(
242+
icon: FontAwesomeIcons.linkedin,
243+
label: 'LinkedIn',
244+
url: 'https://www.linkedin.com/in/harshit-khandelwal-3a76631b9/',
245+
),
246+
_buildSocialLink(
247+
icon: FontAwesomeIcons.medium,
248+
label: 'Medium',
249+
url: 'https://medium.com/@Harshit2756',
250+
),
251+
],
252+
);
253+
}
254+
255+
Widget _buildSocialLink({
256+
required IconData icon,
257+
required String label,
258+
required String url,
259+
}) {
260+
return Tooltip(
261+
message: label,
262+
child: InkWell(
263+
onTap: () => _launchUrl(url),
264+
borderRadius: BorderRadius.circular(8),
265+
child: Container(
266+
padding: const EdgeInsets.symmetric(
267+
horizontal: 12,
268+
vertical: 8,
269+
),
270+
child: Row(
271+
mainAxisSize: MainAxisSize.min,
272+
children: [
273+
FaIcon(
274+
icon,
275+
size: 18,
276+
color: themeColor,
277+
),
278+
const SizedBox(width: 8),
279+
Text(
280+
label,
281+
style: TextStyle(
282+
color: themeColor,
283+
fontSize: 14,
284+
),
285+
),
286+
],
287+
),
288+
),
289+
),
290+
);
291+
}
292+
293+
Future<void> _launchUrl(String url) async {
294+
if (!await launchUrl(Uri.parse(url))) {
295+
throw Exception('Could not launch $url');
296+
}
297+
}
298+
}
299+
EOL
300+
49301
- name: Create .env file
50302
run: |
51303
cat > lib/config/api_keys.env << EOL
@@ -59,6 +311,8 @@ jobs:
59311
cat > lib/main.dart << 'EOL' #. Replace with your main.dart content
60312
import 'dart:io';
61313
import 'package:device_preview_screenshot/device_preview_screenshot.dart';
314+
import 'package:device_preview/device_preview.dart';
315+
import 'device_preview_button.dart';
62316
import 'package:flutter/material.dart';
63317
import 'package:google_clone/colors.dart';
64318
import 'package:flutter_dotenv/flutter_dotenv.dart';
@@ -71,21 +325,21 @@ jobs:
71325
// Try multiple paths
72326
await dotenv.load(fileName: "lib/config/api_keys.env");
73327
} catch (e) {
74-
try {
75-
await dotenv.load(fileName: "assets/config/api_keys.env");
76-
} catch (e) {
77328
print("Failed to load .env file, using environment variables");
78329
// Fallback to environment variables
79330
dotenv.env['API_KEY'] = Platform.environment['API_KEY'] ?? '';
80331
dotenv.env['CONTEXT_KEY'] = Platform.environment['CONTEXT_KEY'] ?? '';
81-
}
82332
}
83333
runApp(
84334
DevicePreview(
85335
// backgroundColor: ,
86336
tools: const [
337+
CustomPlugin(
338+
apkDownloadUrl: "https://github.com/${{ github.repository }}/releases/download/v1.0.0/app-release.apk",
339+
sourceCodeUrl: "https://github.com/${{ github.repository }}/archive/refs/tags/v1.0.0.zip",
340+
),
87341
DeviceSection(
88-
frameVisibility: false,
342+
frameVisibility: true,
89343
orientation: false,
90344
),
91345
// SystemSection(

.metadata

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "2663184aa79047d0a33a14a3b607954f8fdd8730"
7+
revision: "35c388afb57ef061d06a39b537336c87e0e3d1b1"
88
channel: "stable"
99

1010
project_type: app
@@ -13,26 +13,26 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
17-
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
16+
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
17+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
1818
- platform: android
19-
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
20-
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
19+
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
20+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
2121
- platform: ios
22-
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
23-
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
22+
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
23+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
2424
- platform: linux
25-
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
26-
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
25+
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
26+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
2727
- platform: macos
28-
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
29-
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
28+
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
29+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
3030
- platform: web
31-
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
32-
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
31+
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
32+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
3333
- platform: windows
34-
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
35-
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
34+
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
35+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
3636

3737
# User provided section
3838

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"dart.flutterSdkPath": ".fvm/versions/3.24.3",
2+
"dart.flutterSdkPath": ".fvm/versions/3.29.0"
33
}

android/app/.cxx/Debug/264f3kp4/arm64-v8a/.cmake/api/v1/query/client-agp/cache-v2

Whitespace-only changes.

android/app/.cxx/Debug/264f3kp4/arm64-v8a/.cmake/api/v1/query/client-agp/cmakeFiles-v1

Whitespace-only changes.

android/app/.cxx/Debug/264f3kp4/arm64-v8a/.cmake/api/v1/query/client-agp/codemodel-v2

Whitespace-only changes.

0 commit comments

Comments
 (0)