Skip to content

Commit

Permalink
Merge pull request #2 from Shinobi7k/master
Browse files Browse the repository at this point in the history
Master
  • Loading branch information
mayman007 authored Aug 20, 2023
2 parents afc3f0f + 343c6b5 commit c075f94
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 29 deletions.
25 changes: 3 additions & 22 deletions lib/views/about_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,28 +113,9 @@ class _AboutViewState extends State<AboutView> {
],
),
),
const SizedBox(
height: 15,
),
Column(
children: [
IconButton(
iconSize: 35,
tooltip: 'الكود المصدري',
onPressed: () async {
await _launchUrl(Uri.parse(
'https://github.com/Shinobi7k/HadithSearcher'));
},
icon: const Icon(
Icons.code,
),
alignment: Alignment.center,
),
const Text('الكود المصدري'),
],
),
const SizedBox(
height: 15,
Divider(
color: Theme.of(context).colorScheme.primaryContainer,
thickness: 2,
),
Container(
margin: const EdgeInsets.all(10),
Expand Down
2 changes: 1 addition & 1 deletion lib/views/favourites_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class _FavouritesViewState extends State<FavouritesView> {
'hasSharhMetadata'] ==
true) {
var url = Uri.parse(
"https://dorar-hadith-api.cyclic.app/v1/site/sharh/${hadith['sharhMetadata']['id']}");
"https://dorar-hadith-api.cyclic.cloud/v1/site/sharh/${hadith['sharhMetadata']['id']}");
var response = await http
.get(url)
.timeout(const Duration(
Expand Down
9 changes: 5 additions & 4 deletions lib/views/search_view.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:hadithsearcher/db/database.dart';
import 'package:hadithsearcher/views/similar_hadith_view.dart';
import 'package:http/http.dart' as http;
Expand Down Expand Up @@ -179,7 +180,7 @@ class _SearchViewState extends State<SearchView> {
searchBook = '96';
}
var url = Uri.parse(
'https://dorar-hadith-api.cyclic.app/v1/site/hadith/search?value=$searchKeyword&page=$searchPagaNumber&st=$searchWay&t=$searchRange&d[]=$searchGrade&m[]=$searchMohdith&s[]=$searchBook$searchExcludedWords');
'https://dorar-hadith-api.cyclic.cloud/v1/site/hadith/search?value=$searchKeyword&page=$searchPagaNumber&st=$searchWay&t=$searchRange&d[]=$searchGrade&m[]=$searchMohdith&s[]=$searchBook$searchExcludedWords');
var response = await http.get(url).timeout(const Duration(seconds: 24));
var decodedBody = utf8.decode(response.bodyBytes);
var jsonResponse = json.decode(decodedBody);
Expand Down Expand Up @@ -902,7 +903,7 @@ class _SearchViewState extends State<SearchView> {
],
),
],
),
).animate().fade(duration: 200.ms),
),
)
: _isEmpty
Expand Down Expand Up @@ -983,7 +984,7 @@ class _SearchViewState extends State<SearchView> {
'hasSharhMetadata'] ==
true) {
var url = Uri.parse(
"https://dorar-hadith-api.cyclic.app/v1/site/sharh/${hadith['sharhMetadata']['id']}");
"https://dorar-hadith-api.cyclic.cloud/v1/site/sharh/${hadith['sharhMetadata']['id']}");
var response = await http
.get(url)
.timeout(
Expand Down Expand Up @@ -1187,7 +1188,7 @@ class _SearchViewState extends State<SearchView> {
),
],
),
);
).animate().fade(duration: 200.ms);
},
),
),
Expand Down
4 changes: 2 additions & 2 deletions lib/views/similar_hadith_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _SimilarHadithViewState extends State<SimilarHadithView> {
}
try {
var url = Uri.parse(
'https://dorar-hadith-api.cyclic.app/v1/site/hadith/similar/$hadithId');
'https://dorar-hadith-api.cyclic.cloud/v1/site/hadith/similar/$hadithId');
var response = await http.get(url).timeout(const Duration(seconds: 24));
var decodedBody = utf8.decode(response.bodyBytes);
var jsonResponse = json.decode(decodedBody);
Expand Down Expand Up @@ -266,7 +266,7 @@ class _SimilarHadithViewState extends State<SimilarHadithView> {
if (hadith['hasSharhMetadata'] ==
true) {
var url = Uri.parse(
"https://dorar-hadith-api.cyclic.app/v1/site/sharh/${hadith['sharhMetadata']['id']}");
"https://dorar-hadith-api.cyclic.cloud/v1/site/sharh/${hadith['sharhMetadata']['id']}");
var response = await http
.get(url)
.timeout(
Expand Down
8 changes: 8 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_animate:
dependency: "direct main"
description:
name: flutter_animate
sha256: "62f346340a96192070e31e3f2a1bd30a28530f1fe8be978821e06cd56b74d6d2"
url: "https://pub.dev"
source: hosted
version: "4.2.0+1"
flutter_launcher_icons:
dependency: "direct main"
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dependencies:
url_launcher: ^6.1.12
in_app_update: ^4.1.4
flutter_launcher_icons: ^0.13.1
flutter_animate: ^4.2.0+1

flutter_native_splash:
color: "#ffffff"
Expand Down

0 comments on commit c075f94

Please sign in to comment.