#apifmIntroduction
[apifm packages official website address](https://github.com/gooking/apifm-flutter)
[apifm packages domestic mirror address](https://pub.flutter-io.cn/packages/apifm)
[github project address](https://github.com/gooking/apifm-flutter)
# Why use apifm
apifm is Flutter's cloud development plug-in. Using this plug-in to develop apps, you will no longer need to develop additional API interfaces, develop Admin consoles, or purchase expensive server resources. It will save you not only the above development workload and R&D costs, but more importantly:
**The functions of the apifm plug-in are mature and stable after being verified by countless rigorous production environments, which can save you testing costs, trial and error costs, and project launch time costs**
Using apifm, your current app development process will look like this:
~~1. Purchase a server to run backend and interface programs;~~
~~2. Purchase a domain name, and the App will call the server’s data through the domain name;~~
~~3. Purchase an SSL certificate. Traditional http requests are considered unsafe, and https is the mainstream;~~
~~4. Backend programmers develop backend programs so that they can log in to the backend for product management, order maintenance, fund and financial management, etc.;~~
~~5. API interfaces available for backend programmers to develop apps;~~
~~6. The security, functionality, and stability of the developed backend and interface programs are tested, and bug debugging is completed;~~
7. UI designers design exquisite App interface;
8. The front-end engineer develops the App based on the UI design draft and connects to the API interface to complete the final development;
# How to use
## Add dependencies to the project
Add dependencies to the pubspec.yaml file:
```yaml
dependencies:
apifm: ^0.0.2
```
Then install the plugin:
```shell
flutter pub get
```
##Introduce package
```plain
import 'package:apifm/apifm.dart' as Apifm;
```
## Initialization
```javascript
Apifm.init("gooking");
```
_gooking_ is the exclusive domain name of your developer backend. Log in to your developer backend and view your exclusive domain name on the homepage of the backend. "By default, it is a 32-letter string."
[>> Go to free registration to open the developer backend](https://www.it120.cc/)
## Call api interface
Here we take the calling backend interface of queryMobileLocation as an example to illustrate how to use apifm in Flutter. For other interfaces, you can call the corresponding method according to the instructions in the usage document.
### await method call:
```javascript
var res = await Apifm.queryMobileLocation("13500000000");
print(res);
```
### Future asynchronous method:
```javascript
Apifm.queryMobileLocation("13500000000").then((res) {
print(res);
});
```
# Return value description
The return data (**res**) mainly contains 3 contents:
1. code error code, 0 represents operation reconstruction, other numbers represent errors, please see msg for specific error descriptions;
2. msg If the above code is not 0, then msg will return a specific error description.
3. The data field stores the data when the code is 0. At the same time, the data you need is stored in data and returned to you.
# Related resources
["Functional Instructions Document"](https://github.com/gooking/apifm-flutter/blob/master/instructions.md)
["api interface document"](#)