Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
refactor: Renamed package name langx_flutter with langx dependenc…
Browse files Browse the repository at this point in the history
…y order
  • Loading branch information
xuelink committed Jun 29, 2024
1 parent 8a290e5 commit 5f372a6
Show file tree
Hide file tree
Showing 21 changed files with 102 additions and 102 deletions.
2 changes: 1 addition & 1 deletion ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>langx_flutter</string>
<string>langx</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand Down
14 changes: 7 additions & 7 deletions lib/components/profile/about_me_card.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import 'package:flutter/material.dart';

// Components Import
import 'package:langx_flutter/assets/svg/info_svg.dart';
import 'package:langx_flutter/assets/svg/country_svg.dart';
import 'package:langx_flutter/assets/svg/gender_svg.dart';
import 'package:langx_flutter/assets/svg/calendar_svg.dart';
import 'package:langx_flutter/assets/svg/clock_svg.dart';
import 'package:langx_flutter/assets/svg/at_sign_svg.dart';
import 'package:langx_flutter/assets/svg/shield_svg.dart';
import 'package:langx/assets/svg/info_svg.dart';
import 'package:langx/assets/svg/country_svg.dart';
import 'package:langx/assets/svg/gender_svg.dart';
import 'package:langx/assets/svg/calendar_svg.dart';
import 'package:langx/assets/svg/clock_svg.dart';
import 'package:langx/assets/svg/at_sign_svg.dart';
import 'package:langx/assets/svg/shield_svg.dart';

class ProfileAboutMeCard extends StatelessWidget {
final String country;
Expand Down
2 changes: 1 addition & 1 deletion lib/components/profile/day_streaks_card.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

// Components Imports
import 'package:langx_flutter/assets/svg/info_svg.dart';
import 'package:langx/assets/svg/info_svg.dart';

class ProfileDayStreaksCard extends StatelessWidget {
final String imgUrl;
Expand Down
2 changes: 1 addition & 1 deletion lib/components/profile/mother_tongues_card.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

// Components Imports
import 'package:langx_flutter/assets/svg/word_svg.dart';
import 'package:langx/assets/svg/word_svg.dart';

class MotherTonguesCard extends StatelessWidget {
final List<String> languages;
Expand Down
4 changes: 2 additions & 2 deletions lib/components/profile/others_card.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';

// Components Imports
import 'package:langx_flutter/assets/svg/people_svg.dart';
import 'package:langx_flutter/assets/svg/eye_svg.dart';
import 'package:langx/assets/svg/people_svg.dart';
import 'package:langx/assets/svg/eye_svg.dart';

class OthersCard extends StatelessWidget {
const OthersCard({
Expand Down
2 changes: 1 addition & 1 deletion lib/components/profile/study_languages_card.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

// Components Imports
import 'package:langx_flutter/assets/svg/battery_svg.dart';
import 'package:langx/assets/svg/battery_svg.dart';

class StudyLanguagesCard extends StatelessWidget {
final List<String> languages;
Expand Down
4 changes: 2 additions & 2 deletions lib/components/profile/token_card.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';

// Components Imports
import 'package:langx_flutter/assets/svg/trophy_svg.dart';
import 'package:langx_flutter/assets/svg/info_svg.dart';
import 'package:langx/assets/svg/trophy_svg.dart';
import 'package:langx/assets/svg/info_svg.dart';

class ProfileTokenCard extends StatelessWidget {
final String imgUrl;
Expand Down
8 changes: 4 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:toastification/toastification.dart';

// Themes Import
import 'package:langx_flutter/theme.dart';
import 'package:langx/theme.dart';

// Pages Import
import 'package:langx_flutter/pages/login/login.dart';
import 'package:langx_flutter/pages/home/home.dart';
import 'package:langx/pages/login/login.dart';
import 'package:langx/pages/home/home.dart';

// Providers Import
import 'package:langx_flutter/providers/auth_provider.dart';
import 'package:langx/providers/auth_provider.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
Expand Down
6 changes: 3 additions & 3 deletions lib/pages/home/community.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

// Components Import
import 'package:langx_flutter/components/community/usercard.dart';
import 'package:langx_flutter/providers/user_provider.dart';
import 'package:langx/components/community/usercard.dart';
import 'package:langx/providers/user_provider.dart';

// Pages Import
import 'package:langx_flutter/pages/home/filters.dart';
import 'package:langx/pages/home/filters.dart';

class Community extends ConsumerStatefulWidget {
const Community({super.key});
Expand Down
10 changes: 5 additions & 5 deletions lib/pages/home/filters.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:flutter/material.dart';

import 'package:langx_flutter/assets/svg/battery_svg.dart';
import 'package:langx_flutter/assets/svg/word_svg.dart';
import 'package:langx_flutter/assets/svg/country_svg.dart';
import 'package:langx_flutter/assets/svg/sex_svg.dart';
import 'package:langx_flutter/assets/svg/switch_svg.dart';
import 'package:langx/assets/svg/battery_svg.dart';
import 'package:langx/assets/svg/word_svg.dart';
import 'package:langx/assets/svg/country_svg.dart';
import 'package:langx/assets/svg/sex_svg.dart';
import 'package:langx/assets/svg/switch_svg.dart';

class FiltersPage extends StatefulWidget {
const FiltersPage({super.key});
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/home/home.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';

// Pages Import
import 'package:langx_flutter/pages/home/community.dart';
import 'package:langx_flutter/pages/home/profile.dart';
import 'package:langx/pages/home/community.dart';
import 'package:langx/pages/home/profile.dart';

class Home extends StatefulWidget {
const Home({super.key});
Expand Down
18 changes: 9 additions & 9 deletions lib/pages/home/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

// Providers Import
import 'package:langx_flutter/providers/auth_provider.dart';
import 'package:langx/providers/auth_provider.dart';

// Components Import
import 'package:langx_flutter/components/profile/user_card.dart';
import 'package:langx_flutter/components/profile/token_card.dart';
import 'package:langx_flutter/components/profile/day_streaks_card.dart';
import 'package:langx_flutter/components/profile/about_me_card.dart';
import 'package:langx_flutter/components/profile/study_languages_card.dart';
import 'package:langx_flutter/components/profile/mother_tongues_card.dart';
import 'package:langx_flutter/components/profile/badges_card.dart';
import 'package:langx_flutter/components/profile/others_card.dart';
import 'package:langx/components/profile/user_card.dart';
import 'package:langx/components/profile/token_card.dart';
import 'package:langx/components/profile/day_streaks_card.dart';
import 'package:langx/components/profile/about_me_card.dart';
import 'package:langx/components/profile/study_languages_card.dart';
import 'package:langx/components/profile/mother_tongues_card.dart';
import 'package:langx/components/profile/badges_card.dart';
import 'package:langx/components/profile/others_card.dart';

class Profile extends ConsumerStatefulWidget {
const Profile({super.key});
Expand Down
8 changes: 4 additions & 4 deletions lib/pages/login/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

// Providers Import
import 'package:langx_flutter/providers/auth_provider.dart';
import 'package:langx/providers/auth_provider.dart';

// Component Imports
import 'package:langx_flutter/components/atomic/dfault_buttons.dart';
import 'package:langx_flutter/components/atomic/dfault_input.dart';
import 'package:langx_flutter/components/atomic/oauth_button.dart';
import 'package:langx/components/atomic/dfault_buttons.dart';
import 'package:langx/components/atomic/dfault_input.dart';
import 'package:langx/components/atomic/oauth_button.dart';

class LoginScreen extends ConsumerStatefulWidget {
const LoginScreen({super.key});
Expand Down
6 changes: 3 additions & 3 deletions lib/providers/auth_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

// Service Imports
import 'package:langx_flutter/services/auth_service.dart';
import 'package:langx/services/auth_service.dart';

// Page Imports
import 'package:langx_flutter/pages/home/home.dart';
import 'package:langx_flutter/pages/login/login.dart';
import 'package:langx/pages/home/home.dart';
import 'package:langx/pages/login/login.dart';

// Define an enum for authentication state
enum AuthStatus { authenticated, unauthenticated, loading, error }
Expand Down
2 changes: 1 addition & 1 deletion lib/providers/user_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

// Service Imports
import 'package:langx_flutter/services/user_service.dart';
import 'package:langx/services/user_service.dart';

class UserNotifier extends StateNotifier<List<dynamic>> {
UserNotifier() : super([]);
Expand Down
2 changes: 1 addition & 1 deletion lib/services/auth_service.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

// Service Imports
import 'package:langx_flutter/services/api_service.dart';
import 'package:langx/services/api_service.dart';

Future<bool> isLoggedIn() async {
try {
Expand Down
2 changes: 1 addition & 1 deletion lib/services/user_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';

// Service Imports
import 'package:langx_flutter/services/api_service.dart';
import 'package:langx/services/api_service.dart';

Future<List<dynamic>> listUsers() async {
try {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: langx_flutter
name: langx
description: "We connect language learners worldwide. Practice and immerse yourself in different languages. "
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
Expand Down
2 changes: 1 addition & 1 deletion test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

// import 'package:langx_flutter/main.dart';
// import 'package:langx/main.dart';

void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
Expand Down
38 changes: 19 additions & 19 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<!--
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
Expand All @@ -14,25 +14,25 @@
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="$FLUTTER_BASE_HREF">
<base href="$FLUTTER_BASE_HREF" />

<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<meta charset="UTF-8" />
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
<meta name="description" content="A new Flutter project." />

<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="langx_flutter">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content="langx" />
<link rel="apple-touch-icon" href="icons/Icon-192.png" />

<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png" />

<title>langx_flutter</title>
<link rel="manifest" href="manifest.json">
</head>
<body>
<script src="flutter_bootstrap.js" async></script>
</body>
<title>langx</title>
<link rel="manifest" href="manifest.json" />
</head>
<body>
<script src="flutter_bootstrap.js" async></script>
</body>
</html>
66 changes: 33 additions & 33 deletions web/manifest.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
"name": "langx_flutter",
"short_name": "langx_flutter",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
"name": "langx",
"short_name": "langx",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}

0 comments on commit 5f372a6

Please sign in to comment.