File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,5 @@ import 'scalable.dart';
17
17
extension ScOnNumExtension on num {
18
18
/// Multiples the num with the current app scale.
19
19
// ignore: invalid_use_of_protected_member
20
- double get sc => this * (Scalable .di. getSyncOrNull () ?? 1.0 );
20
+ double get sc => this * (Scalable .pScale.value ?? 1.0 );
21
21
}
Original file line number Diff line number Diff line change 10
10
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
11
11
//.title~
12
12
13
- import 'dart:async' show FutureOr;
14
- import 'package:df_di/df_di.dart' show DI;
15
- import 'package:df_pod/df_pod.dart'
16
- show SharedDoublePodCreator, TSharedGlobalDoublePod;
13
+ import 'package:df_pod/df_pod.dart' show SharedPod;
17
14
import 'package:flutter/foundation.dart' show protected;
18
15
19
16
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
20
17
21
18
final class Scalable {
22
19
Scalable ._();
23
20
@protected
24
- static final di = DI ();
25
- static final Future <TSharedGlobalDoublePod > _pScale =
26
- SharedDoublePodCreator .global ('<AppScale.pValue>' )
27
- .then ((e) => di.register <TSharedGlobalDoublePod >(_pScale));
28
- static FutureOr <TSharedGlobalDoublePod > get pScale =>
29
- di.until <TSharedGlobalDoublePod >();
21
+ static final pScale = SharedPod <double , double >(
22
+ '<Scalable.pScale>' ,
23
+ fromValue: (e) => e,
24
+ toValue: (e) => e,
25
+ )..refresh ();
30
26
}
Original file line number Diff line number Diff line change 12
12
13
13
name : df_scalable
14
14
description : A package that provides a convenient method to scale your app UI up or down.
15
- version : 0.5 .0
15
+ version : 0.6 .0
16
16
repository : https://github.com/robmllze/df_scalable
17
17
funding :
18
18
- https://www.buymeacoffee.com/robmllze
You can’t perform that action at this time.
0 commit comments