v0.5.0
signal_strength_indicator
Flutter용 사용자 정의 가능한 신호 세기 인디케이터 위젯입니다. 신호 세기를 쉽게 시각화할 수 있습니다.
35좋아요 9.8천30일 다운로드160Pub 점수
AndroidiOSWebmacOSWindowsLinux
Flutter용 사용자 정의 가능한 신호 세기 표시 위젯
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Customizable signal strength indicator widget for Flutter.
See the WEB DEMO.
Two visual variants:
Add this to your pubspec.yaml:
dependencies:
signal_strength_indicator: ^0.5.0
Then run:
flutter pub get
Import in your Dart code:
import 'package:signal_strength_indicator/signal_strength_indicator.dart';
SignalStrengthIndicator.bars(
value: 0.6,
size: 40,
barCount: 4,
spacing: 0.2,
activeColor: Colors.green,
inactiveColor: Colors.grey.shade300,
)
SignalStrengthIndicator.sector(
value: 0.6,
size: 40,
barCount: 4,
spacing: 0.3,
rounded: true,
)
SignalStrengthIndicator.bars(
value: -65, // e.g. RSSI in dBm
minValue: -100,
maxValue: -40,
size: 40,
)
levelslevels is a Map<num, Color> mapping absolute thresholds to colors.
A bar/segment becomes active and uses the color of the highest threshold
that is <= the current value.
SignalStrengthIndicator.bars(
value: signalValue,
minValue: 0,
maxValue: 100,
size: 40,
barCount: 3,
levels: {
33: Colors.red,
66: Colors.orange,
100: Colors.green,
},
)
// Rounded corners
SignalStrengthIndicator.bars(
value: 0.7,
size: 40,
radius: const Radius.circular(4),
)
// Bevelled (each bar steps up at an angle)
SignalStrengthIndicator.bars(
value: 0.7,
size: 40,
bevelled: true,
)
bars and sector)| Parameter | Type | Default | Description |
|---|---|---|---|
value |
num |
required | Current signal value |
minValue |
num? |
0.0 |
Minimum value of the range |
maxValue |
num? |
1.0 |
Maximum value of the range |
size |
double? |
icon theme size | Width and height of the widget |
barCount |
int |
3 |
Number of bars/segments |
activeColor |
Color? |
green | Color of active bars (when no levels) |
inactiveColor |
Color? |
light green | Color of inactive bars |
levels |
Map<num, Color>? |
— | Threshold-to-color mapping (absolute values) |
spacing |
double |
0.2 / 0.3 |
Gap between bars as a fraction of bar size |
margin |
EdgeInsets |
zero | Outer margin around the widget |
| Parameter | Type | Default | Description |
|---|---|---|---|
radius |
Radius? |
Radius.zero |
Corner radius of each bar |
bevelled |
bool |
false |
Draw bars with an angled top edge |
| Parameter | Type | Default | Description |
|---|---|---|---|
rounded |
bool |
false |
Use rounded arc cap ends |
Please file feature requests and bugs at the issue tracker.
의존성 목록 3 개
{"sdk":"flutter"}{"sdk":"flutter"}>=5.0.0 <7.0.0사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗