Skip to content

Commit

Permalink
Merge branch 'release/0.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanaidilp committed Dec 6, 2023
2 parents 4e5d5ce + c49e67c commit f32d7ea
Show file tree
Hide file tree
Showing 121 changed files with 2,971 additions and 685 deletions.
166 changes: 166 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
targets:
$default:
builders:
json_serializable:
options:
field_rename: snake
freezed:freezed:
generate_for:
include:
- lib/src/features/**/models/**.dart
injectable_generator|injectable_config_builder:
enabled: true
generate_for:
include:
- lib/src/core/di/**.dart
- lib/src/core/log/**.dart
- lib/src/core/network/**.dart
- lib/src/core/storage/**.dart
- lib/src/features/**/data/datasources/**.dart
- lib/src/features/**/data/repositories/**.dart
- lib/src/features/**/domain/usecases/**.dart
- lib/src/list/**.dart
- lib/src/shared/data/**/**.dart
- lib/src/view/**.dart
envied_generator:
enabled: true
generate_for:
include:
- lib/src/config/**.dart
3 changes: 2 additions & 1 deletion example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ app.*.map.json
/android/app/release

.env
/lib/config/env.g.dart
/lib/config/env.g.dart
pubspec_overrides.yaml
8 changes: 8 additions & 0 deletions example/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
targets:
$default:
builders:
envied_generator:
enabled: true
generate_for:
include:
- lib/config/**.dart
8 changes: 4 additions & 4 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ SPEC CHECKSUMS:
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
video_player_avfoundation: 8563f13d8fc8b2c29dc2d09e60b660e4e8128837
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b
video_player_avfoundation: e9e6f9cae7d7a6d9b43519b0aab382bca60fcfd1
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a

PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189

COCOAPODS: 1.13.0
COCOAPODS: 1.14.3
2 changes: 1 addition & 1 deletion example/lib/app/modules/domain/views/domain_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:stadata_flutter_sdk/stadata_flutter_sdk.dart';
import '../controllers/domain_controller.dart';

class DomainView extends GetView<DomainController> {
const DomainView({Key? key}) : super(key: key);
const DomainView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
3 changes: 2 additions & 1 deletion example/lib/app/modules/home/views/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:stadata_example/app/routes/app_pages.dart';
import '../controllers/home_controller.dart';

class HomeView extends GetView<HomeController> {
const HomeView({Key? key}) : super(key: key);
const HomeView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -30,6 +30,7 @@ class HomeView extends GetView<HomeController> {
const _Button('Press Releases', Routes.PRESS_RELEASE),
const _Button('Publications', Routes.PUBLICATION),
const _Button('Static Tables', Routes.STATIC_TABLE),
const _Button('Strategic Indicators', Routes.STRATEGIC_INDICATOR),
const _Button('Subject Categories', Routes.SUBJECT_CATEGORY),
const _Button('Subjects', Routes.SUBJECT),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:stadata_flutter_sdk/stadata_flutter_sdk.dart';
import '../controllers/infographic_controller.dart';

class InfographicView extends GetView<InfographicController> {
const InfographicView({Key? key}) : super(key: key);
const InfographicView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
6 changes: 3 additions & 3 deletions example/lib/app/modules/news/controllers/news_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class NewsController extends GetxController with StateMixin<ListResult<News>> {
lang: selectedLang.value,
keyword: keyword.value,
page: int.parse(page.value),
year: date.value != null ? date.value!.year : null,
month: date.value != null ? date.value!.month : null,
newsCategoryId: newsCategory.value?.id,
year: date.value?.year,
month: date.value?.month,
newsCategoryID: newsCategory.value?.id,
);

if (result.data.isEmpty) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/app/modules/news/views/news_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'package:stadata_flutter_sdk/stadata_flutter_sdk.dart';
import '../controllers/news_controller.dart';

class NewsView extends GetView<NewsController> {
const NewsView({Key? key}) : super(key: key);
const NewsView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:stadata_flutter_sdk/stadata_flutter_sdk.dart';
import '../controllers/news_category_controller.dart';

class NewsCategoryView extends GetView<NewsCategoryController> {
const NewsCategoryView({Key? key}) : super(key: key);
const NewsCategoryView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:stadata_example/app/utils/date_formatter.dart';
import '../controllers/news_detail_controller.dart';

class NewsDetailView extends GetView<NewsDetailController> {
const NewsDetailView({Key? key}) : super(key: key);
const NewsDetailView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'package:stadata_flutter_sdk/stadata_flutter_sdk.dart';
import '../controllers/press_release_controller.dart';

class PressReleaseView extends GetView<PressReleaseController> {
const PressReleaseView({Key? key}) : super(key: key);
const PressReleaseView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:stadata_example/app/utils/date_formatter.dart';
import '../controllers/press_release_detail_controller.dart';

class PressReleaseDetailView extends GetView<PressReleaseDetailController> {
const PressReleaseDetailView({Key? key}) : super(key: key);
const PressReleaseDetailView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'package:stadata_flutter_sdk/stadata_flutter_sdk.dart';
import '../controllers/publication_controller.dart';

class PublicationView extends GetView<PublicationController> {
const PublicationView({Key? key}) : super(key: key);
const PublicationView({super.key});

dispose() {}
@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'package:stadata_flutter_sdk/stadata_flutter_sdk.dart';
import '../controllers/publication_detail_controller.dart';

class PublicationDetailView extends GetView<PublicationDetailController> {
const PublicationDetailView({Key? key}) : super(key: key);
const PublicationDetailView({super.key});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'package:stadata_flutter_sdk/stadata_flutter_sdk.dart';
import '../controllers/static_table_controller.dart';

class StaticTableView extends GetView<StaticTableController> {
const StaticTableView({Key? key}) : super(key: key);
const StaticTableView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:stadata_example/app/utils/date_formatter.dart';
import '../controllers/static_table_detail_controller.dart';

class StaticTableDetailView extends GetView<StaticTableDetailController> {
const StaticTableDetailView({Key? key}) : super(key: key);
const StaticTableDetailView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:get/get.dart';

import '../controllers/strategic_indicator_controller.dart';

class StrategicIndicatorBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut<StrategicIndicatorController>(
() => StrategicIndicatorController(),
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import 'package:get/get.dart';
import 'package:stadata_flutter_sdk/stadata_flutter_sdk.dart';

class StrategicIndicatorController extends GetxController
with StateMixin<ListResult<StrategicIndicator>> {
final selectedLang = Rx(DataLanguage.id);
final domain = RxString('00');
final variableID = RxString('0');
final page = RxString('1');

@override
void onInit() {
loadStrategicIndicators();
super.onInit();
}

Future loadStrategicIndicators() async {
try {
change(null, status: RxStatus.loading());
final result = await StadataFlutter.instance.list.strategicIndicators(
domain: '${domain.value}00',
lang: selectedLang.value,
variableID: int.tryParse(variableID.value),
page: int.tryParse(page.value) ?? 1,
);

if (result.data.isEmpty) {
change(null, status: RxStatus.empty());
} else {
change(result, status: RxStatus.success());
}
} catch (e) {
change(null, status: RxStatus.error(e.toString()));
}
}
}
Loading

0 comments on commit f32d7ea

Please sign in to comment.