Skip to content

Commit

Permalink
update WP & use dio
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed May 17, 2024
1 parent c90792e commit 2dbf9cb
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 23 deletions.
3 changes: 1 addition & 2 deletions lib/Frontend/Widgets/tail_blog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ List<Post> _wordpressPosts = [];
class _TailBlogState extends State<TailBlog> {
FeedState feedState = FeedState.loading;
List<FeedItem> results = [];
final WordpressClient client = WordpressClient(baseUrl: Uri.parse('https://thetailcompany.com/wp-json/wp/v2'));
final WordpressClient client = WordpressClient.fromDioInstance(baseUrl: Uri.parse('https://thetailcompany.com/wp-json/wp/v2'), instance: initDio());

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -96,7 +96,6 @@ class _TailBlogState extends State<TailBlog> {
@override
void initState() {
super.initState();
client.initialize();
getFeed();
}

Expand Down
45 changes: 29 additions & 16 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
sha256: "5aaf60d96c4cd00fe7f21594b5ad6a1b699c80a27420f8a837f4d68473ef09e3"
url: "https://pub.dev"
source: hosted
version: "67.0.0"
version: "68.0.0"
_flutterfire_internals:
dependency: transitive
description:
Expand All @@ -17,14 +17,19 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.33"
_macros:
dependency: transitive
description: dart
source: sdk
version: "0.1.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
sha256: "21f1d3720fd1c70316399d5e2bccaebb415c434592d778cce8acb967b8578808"
url: "https://pub.dev"
source: hosted
version: "6.4.1"
version: "6.5.0"
analyzer_plugin:
dependency: transitive
description:
Expand Down Expand Up @@ -602,7 +607,7 @@ packages:
source: hosted
version: "7.1.0"
flutter_localizations:
dependency: "direct main"
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
Expand Down Expand Up @@ -642,10 +647,10 @@ packages:
dependency: "direct main"
description:
name: flutter_screen_lock
sha256: "5c09314747a70d8e1259a1d787f49f4f29d6eae224cd9b2f045e513e8408cbcc"
sha256: "07cb55016cf16b0374e6f79918964c65f2f722a461d1f56eb79cb88e1123b9a7"
url: "https://pub.dev"
source: hosted
version: "9.0.3"
version: "9.1.0"
flutter_test:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -897,6 +902,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.1"
macros:
dependency: transitive
description:
name: macros
sha256: "12e8a9842b5a7390de7a781ec63d793527582398d16ea26c60fed58833c9ae79"
url: "https://pub.dev"
source: hosted
version: "0.1.0-main.0"
markdown:
dependency: transitive
description:
Expand All @@ -922,13 +935,13 @@ packages:
source: hosted
version: "0.8.0"
meta:
dependency: transitive
dependency: "direct overridden"
description:
name: meta
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.12.0"
version: "1.15.0"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -1199,10 +1212,10 @@ packages:
dependency: transitive
description:
name: riverpod_analyzer_utils
sha256: "8b71f03fc47ae27d13769496a1746332df4cec43918aeba9aff1e232783a780f"
sha256: ee72770090078e6841d51355292335f1bc254907c6694283389dcb8156d99a4d
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "0.5.3"
riverpod_annotation:
dependency: "direct main"
description:
Expand All @@ -1215,10 +1228,10 @@ packages:
dependency: "direct dev"
description:
name: riverpod_generator
sha256: d451608bf17a372025fc36058863737636625dfdb7e3cbf6142e0dfeb366ab22
sha256: "1ad626afbd8b01d168870b13c0b036f8a5bdb57c14cd426dc5b4595466bd6e2f"
url: "https://pub.dev"
source: hosted
version: "2.4.0"
version: "2.4.2"
sensors_plus:
dependency: transitive
description:
Expand Down Expand Up @@ -1669,10 +1682,10 @@ packages:
dependency: "direct main"
description:
name: wordpress_client
sha256: "8755495dc6907e94a770aef77d209f9df5a8f6c716a174dc2c88adbcaefa39c0"
sha256: "372056c7b6c89caece208296febe37dd93c747760d0a91dcf620a480bfd73956"
url: "https://pub.dev"
source: hosted
version: "8.4.7"
version: "8.4.8"
xdg_directories:
dependency: transitive
description:
Expand Down
9 changes: 4 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
repository: https://github.com/Codel1417/tail_app
environment:
sdk: '>=3.3.0-0 <4.0.0'
sdk: '>=3.4.0-0 <4.0.0'

platforms:
android:
Expand All @@ -13,8 +13,6 @@ platforms:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cross_platform: ^3.0.1
logging: ^1.2.0
go_router: ^14.1.1
Expand All @@ -27,7 +25,7 @@ dependencies:
#pod_player: ^0.2.2
#tivy: ^0.1.1
circular_buffer: ^0.11.0 # Used for serial console
wordpress_client: ^8.4.7
wordpress_client: ^8.4.8
synchronized: ^3.1.0+1

# Platform Interfaces
Expand Down Expand Up @@ -55,7 +53,7 @@ dependencies:
riverpod_annotation: ^2.3.5

# Widgets / UI
flutter_screen_lock: ^9.0.3 # used to hide dev mode toggle
flutter_screen_lock: ^9.1.0 # used to hide dev mode toggle
introduction_screen: ^3.1.14 # Onboarding
lottie: ^3.1.1
flex_color_picker: ^3.5.0
Expand Down Expand Up @@ -170,3 +168,4 @@ flutter_native_splash:
color_dark: "#0573a4"
dependency_overrides:
device_info_plus: any # PDFx uses an older version, but v10 and newer is required for IOS publishing
meta: any

0 comments on commit 2dbf9cb

Please sign in to comment.