我正在尝试使用颤振中的容器小部件构建一侧圆形边框。我已经搜索过它,但找不到任何解决方案。
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) 我想使用 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) 我是扑的新手。我试图用颤动在地图上放置图钉,
在这里,我使用 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)