Flutter 仿微博客户端!A Weibo client application developed with Flutter, which supports both Android and iOS.
BSD-3-CLAUSE License
Language: English | 中文简体
A Weibo client application developed with Flutter, which supports both Android and iOS.Similar to the official Weibo x9.99% experience, offline mode, multi-language support, themes can be changed at will, the fluency is beyond imagination, all kinds of surprise details are waiting for you to discover.
View Weibo News, Content, Comments View Hot Topics, Weibo, Hot Search Support Topics, @, Emoticons, Full Text Offline mode International Theme Color
Similar to Weibo news, WeChat circle of friends, WeChat group, DingDing group, support single big picture preview.
NineGridView(
margin: EdgeInsets.all(12),
padding: EdgeInsets.all(5),
space: 5,
type: NineGridType.weChatGp,
itemCount: itemCount,
itemBuilder: (BuildContext context, int index) {},
);
Similar to the Weibo / WeChat publish dynamic NineGridView, it supports pressing the zoom effect, dragging and sorting, and dragging to the specified location to delete.
DragSortView(
imageList,
space: 5,
margin: EdgeInsets.all(20),
padding: EdgeInsets.all(0),
itemBuilder: (BuildContext context, int index) {},
initBuilder: (BuildContext context) {},
onDragListener: (MotionEvent event, double itemWidth) {
/// Judge to drag to the specified position to delete
/// return true;
if (event.globalY > 600) {
return true;
}
return false;
},
);
Large picture function tool class.
Image image = new Image(image: new CachedNetworkImageProvider("Url"));
Image imageAsset = new Image.asset("");
Image imageFile = new Image.file(File("path"));
Image imageNetwork = new Image.network("url");
Image imageMemory = new Image.memory(null);
ImageUtil imageUtil = ImageUtil();
Rect rect = await imageUtil.getImageSize(image: image);
ImageUtil().getImageSize(image: image).then((Rect rect) {
print("rect: " + rect.toString();
});
XOR + Base64
const String key = '11, 22, 33, 44, 55, 66';
String value = 'Sky24n';
String encode = EncryptUtil.xorBase64Encode(value, key); // WH1YHgMs
String decode = EncryptUtil.xorBase64Decode(encode, key); // Sky24n
Simply encapsulate json string to object.
String objStr = "{\"name\":\"成都市\"}";
City hisCity = JsonUtil.getObj(objStr, (v) => City.fromJson(v));
String listStr = "[{\"name\":\"成都市\"}, {\"name\":\"北京市\"}]";
List<City> cityList = JsonUtil.getObjList(listStr, (v) => City.fromJson(v));
Format timestamp.
/// year -> yyyy/yy month -> MM/M day -> dd/d
/// hour -> HH/H minute -> mm/m second -> ss/s
DateUtil.formatDateMs(DateTime.now().millisecondsSinceEpoch, format: DataFormats.full); // 2019-07-09 16:51:14
DateUtil.formatDateStr("2019-07-09 16:51:14", format: "yyyy/M/d HH:mm:ss"); // 2019/7/9 16:51:14
DateUtil.formatDate(DateTime.now(), format: "yyyy/MM/dd HH:mm:ss"); // 2019/07/09 16:51:14
DateUtil.formatDateMs(ms, format: "yyyy年MM月dd日 HH时mm分ss秒"); // 2019年07月09日 16时51分14秒
Similar to WeChat Moments, Weibo dynamic timeline.
enum DayFormat {
///(less than 10s->just now)、x minutes、x hours、(Yesterday)、x days.
///(小于10s->刚刚)、x分钟、x小时、(昨天)、x天.
Simple,
///(less than 10s->just now)、x minutes、x hours、[This year:(Yesterday/a day ago)、(two days age)、MM-dd ]、[past years: yyyy-MM-dd]
///(小于10s->刚刚)、x分钟、x小时、[今年: (昨天/1天前)、(2天前)、MM-dd],[往年: yyyy-MM-dd].
Common,
///日期 + HH:mm
///(less than 10s->just now)、x minutes、x hours、[This year:(Yesterday HH:mm/a day ago)、(two days age)、MM-dd HH:mm]、[past years: yyyy-MM-dd HH:mm]
///小于10s->刚刚)、x分钟、x小时、[今年: (昨天 HH:mm/1天前)、(2天前)、MM-dd HH:mm],[往年: yyyy-MM-dd HH:mm].
Full,
}
TimelineUtil.format(timeMillis, locale: Localizations.localeOf(context).languageCode, dayFormat: DayFormat.Common);
Home | Discover | Me |
---|---|---|
Weibo publish | Weibo content | User Page |
Auth | Setting | Photo |
GitHub : Fitness Apk :v0.0.1 (arm64-v8a) Baidu Pan :code ttbn Others :v0.0.1