5 Star 24 Fork 7

javazj / apifm-flutter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

功能介绍

apifm 为你提供了 Flutter 的云开发支持,无需服务器,无需开发接口和后台,开箱即用,轻松开发 Flutter

只要你会 Flutter 开发就够了!免费注册开发者后台账号,勾选你需要的模块(CMS、CRM、商城等等),在后台发布并管理你的数据,通过 apifm 扩展直接调用即可

希望你能爱上TA

QQ交流群: 577126347

平台支持

使用方法

pubspec.yaml 文件增加依赖

dependencies:
  apifm: ^0.0.5

安装依赖

$ flutter pub get

引入 package

import 'package:apifm/apifm.dart' as Apifm;

初始化

Apifm.init("gooking");

gooking 为你的开发者后台的专属域名,登录你的开发者后台,在后台首页即可查看属于你的专属域名「默认情况下为32个字母长度的字符串」

>> 前往免费注册开通开发者后台

调用api接口

这里以查询手机号码归属地(queryMobileLocation)的调用后台接口为例子说明如何在 Flutter 中使用 apifm ,其他接口,你可以根据使用文档的说明调用相应的方法即可

await 方式调用「推荐」:

var res = await Apifm.queryMobileLocation("13500000000");
print(res);

Future 异步方法:

Apifm.queryMobileLocation("13500000000").then((res) {
  print(res);
});

返回值说明

返回数据 (res) 主要包含 3 个内容:

  1. code 错误码,0 代表操作重构,其他数字均表示错误,具体错误描述请查看 msg;
  2. msg 如果上面的code不为0,那么 msg 将会返回具体的错误说明描述
  3. data 字段保存了 code 为0 时候的数据,一起你需要的数据,都保存在 data 中返回给你

相关资源

「5分钟上手教程」 「Demo程序」 「功能说明文档」 「api接口文档」

授权协议

MIT License

MIT License Copyright (c) 2019 gooking Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Flutter 的云开发支持,无需服务器,无需开发接口和后台,开箱即用,轻松开发 Flutter 展开 收起
Dart
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Dart
1
https://gitee.com/javazj/apifm-flutter.git
git@gitee.com:javazj/apifm-flutter.git
javazj
apifm-flutter
apifm-flutter
master

搜索帮助