Ex
Just Start with Type : Ex...
not-yet ready for production. (est. 2023 early)
DEMO (WEB)
https://abehbatre.github.io/ex-preview.github.io/#/
Some Example
ImagePreview (overlay, pinch, zoom, interactive) like IG

ExImagePreview.show(
'https://imageurl.com',
),
ExAlert:
tipe : success, error, confirm
example : https://github.com/abehbatre/ex/blob/master/example/lib/helper_gallery/alert_page.dart
ExBottomSheet:
tipe : bottomSheetContentDialog, bottomSheetCustomDialog, bottomSheetListWithSelectedDialog
example : https://github.com/abehbatre/ex/blob/master/example/lib/helper_gallery/bottomsheet_page.dart
ExDialog
tipe : singleInput, custom
example : https://github.com/abehbatre/ex/blob/master/example/lib/helper_gallery/input_dialog_page.dart
ExSnackbar
tipe : neutral, info, warning, success, error, action || top/bottom
example : https://github.com/abehbatre/ex/blob/master/example/lib/helper_gallery/input_dialog_page.dart
ExLog
logD('message');
logE('message');
logW('message');
logI('message');
# output
[ExLog] đģ | message
[ExLog] đ´ | message
[ExLog] đ | message
[ExLog] âšī¸ | message
ExHttp
simple example | lets explore more params/option: https://github.com/abehbatre/ex/blob/master/lib/src/core/ex_http.dart
/// `main.dart` (inject)
void main() {
...
Get.put(ExHttp(
baseURL: 'https://your-api.com',
baseHeader: {
'App-ID': 'ex_v_1038',
'Device-ID': await DeviceInfo().uuid(),
'Device-Type': Platform.operatingSystem,
},
));
...
}
/// repo or provider
class ExampleProvider extends BaseProvider {
// example with baseURL
getUsers() async {
return apiService.httpGet(
endpoint: '/users',
header: {},
query: {},
withToken: true,
);
}
// example without baseURL
getTodayQoute() async {
return apiService.http(
url: 'https://zenquotes.io/api/today',
method: Method.GET,
);
}
}
/// put on controller
class ExampleController extends BaseController<ExampleProvider> {
loadAPI() async {
await provider.getUsers().then((response) {
print(response.body);
}).catchError((e) {
print(e);
});
}
}
Screenshoot
























Libraries
- ex
- ex is a helper library that provides readable methods with which you can write cleaner looking code.