library/src/main/java/com/github/lykmapipo/retrofit/HttpService.java
public static synchronized List<MultipartBody.Part> createParts(
            @NonNull Map<String, Object> params
    ) {
        // initialize multipart list
        List<MultipartBody.Part> parts = new ArrayList<MultipartBody.Part>();
        if (!params.isEmpty()) {
            for (String key : params.keySet()) {
                Object value = params.get(key);
                boolean isAllowedPart =
                        !TextUtils.isEmpty(key) && value != null;
                if (isAllowedPart) {
                    MultipartBody.Part part = createPart(key, value);
                    parts.add(part);
                }
            }

        }
        // return multipart list
        return parts;
    }
/**
     * Helper method to convert map of values to list of multipart parts.
     *
     * @param params {@link Map}
     * @return {@link okhttp3.MultipartBody.Part}
     * @since 0.6.0
     */
Helper method to convert map of values to list of multipart parts.
Helper method to convert map of values to list of multipart parts .
public static synchronized List<MultipartBody.Part> createParts(
            @NonNull Map<String, Object> params
    ) {
        List<MultipartBody.Part> parts = new ArrayList<MultipartBody.Part>();
        if (!params.isEmpty()) {
            for (String key : params.keySet()) {
                Object value = params.get(key);
                boolean isAllowedPart =
                        !TextUtils.isEmpty(key) && value != null;
                if (isAllowedPart) {
                    MultipartBody.Part part = createPart(key, value);
                    parts.add(part);
                }
            }
        }
        return parts;
    }
public static synchronized List < MultipartBody . Part > createParts ( @ NonNull Map < String , Object > params ) { List < MultipartBody . Part > parts = new ArrayList < MultipartBody . Part > ( ) ; if ( ! params . isEmpty ( ) ) { for ( String key : params . keySet ( ) ) { Object value = params . get ( key ) ; boolean isAllowedPart = ! TextUtils . isEmpty ( key ) && value != null ; if ( isAllowedPart ) { MultipartBody . Part part = createPart ( key , value ) ; parts . add ( part ) ; } } } return parts ; }
Helper method to convert map of values to list of multipart parts.
Helper method to convert map of values to list of multipart parts .
// initialize multipart list // return multipart list