Fitness

Flutter 仿微博客户端!A Weibo client application developed with Flutter, which supports both Android and iOS.

BSD-3-CLAUSE License

Stars
89

Language: English | 中文简体

Fitness (Person Repos)

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.

Supported Features:

View Weibo News, Content, Comments View Hot Topics, Weibo, Hot Search Support Topics, @, Emoticons, Full Text Offline mode International Theme Color

Share Content

1、NineGridView

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) {},
);

2、DragSortView

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;
  },
);   

3、Get image size ImageUtil

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();
});

4、Simple encryption and decryption EncryptUtil

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

5、JsonUtil JsonUtil

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));

6、Date format DateUtil

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秒

7、Timeline TimelineUtil

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);

Screenshots

Home Discover Me
Weibo publish Weibo content User Page
Auth Setting Photo

About App

GitHub      : Fitness Apk           :v0.0.1 (arm64-v8a) Baidu Pan :code ttbn Others       :v0.0.1

About Author

GitHub    : Sky24n JianShu  : Sky24n JueJin     : Sky24n

Related Projects