小编Shr*_*rma的帖子

如何使用颤振制作小部件的一侧圆形边框?

我正在尝试使用颤振中的容器小部件构建一侧圆形边框。我已经搜索过它,但找不到任何解决方案。

Container(
  width: 150.0,
  padding: const EdgeInsets.all(20.0),
  decoration: BoxDecoration(
    // borderRadius: BorderRadius.circular(30.0),
    /* border: Border(
      left: BorderSide()
    ),*/
  color: Colors.white
  ),
  child: Text("hello"),
),
Run Code Online (Sandbox Code Playgroud)

border dart flutter

48
推荐指数
6
解决办法
7万
查看次数

如何在 Flutter 中从内部和外部存储中获取所有 mp3 文件?

我想使用 flutter 项目在列表视图中显示所有歌曲,但我不知道如何访问我的内部文件夹。

首先,我刚刚创建了一个名为“Shruti”的文件夹,但它是在 /storage/emulated/0/Android/data/com.example.musicplayer/files' 创建的,但我只想在 /storage/emulated 中创建该文件夹/0/ 路径。

因为我不知道,如何读写内部和外部存储。

final directory = await getApplicationDocumentsDirectory();
     print('Directory= $directory');
     // External storage directory: /storage/emulated/0
     Directory externalDirectory = await getExternalStorageDirectory();

     print('External Storage:$externalDirectory ');


     new Directory(externalDirectory.path+'/'+'Shruti').create(recursive: true)
     .then((Directory directory) {
       print('Path of New Dir: '+directory.path);
     });
Run Code Online (Sandbox Code Playgroud)

dart flutter

3
推荐指数
1
解决办法
3922
查看次数

如何在带有颤动的谷歌地图上长按放置图钉?

我是扑的新手。我试图用颤动在地图上放置图钉,

在这里,我使用 geolocator 包获取了当前位置并设置了标记


 GoogleMap(
            onMapCreated: (controller){
              mapController=controller ;
            },
            mapType: _currentMapType,
            myLocationEnabled: true,
            initialCameraPosition: CameraPosition(
              target:_center,
              zoom: 11.0,
            ),
            markers: {
              //Marker for current Location
              Marker(
                markerId: MarkerId("marker"),
                position: LatLng(currentPosition.latitude, currentPosition.longitude),
                infoWindow: InfoWindow(title: 'Current Location'),
                icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueRed)
              )  
            },
          ),

Run Code Online (Sandbox Code Playgroud)

google-maps dart flutter

0
推荐指数
1
解决办法
1740
查看次数

标签 统计

dart ×3

flutter ×3

border ×1

google-maps ×1